mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Be more careful when detaching an old window. b=374102 r+sr=roc
This commit is contained in:
parent
587e9762aa
commit
8e24a56d18
@ -609,8 +609,13 @@ nsresult nsIView::CreateWidget(const nsIID &aWindowIID,
|
|||||||
nsIDeviceContext *dx;
|
nsIDeviceContext *dx;
|
||||||
nsRect trect = mDimBounds;
|
nsRect trect = mDimBounds;
|
||||||
|
|
||||||
NS_ASSERTION(!mWindow, "We already have a window for this view? BAD");
|
if (NS_UNLIKELY(mWindow)) {
|
||||||
NS_IF_RELEASE(mWindow);
|
NS_ERROR("We already have a window for this view? BAD");
|
||||||
|
ViewWrapper* wrapper = GetWrapperFor(mWindow);
|
||||||
|
NS_IF_RELEASE(wrapper);
|
||||||
|
mWindow->SetClientData(nsnull);
|
||||||
|
NS_RELEASE(mWindow);
|
||||||
|
}
|
||||||
|
|
||||||
mViewManager->GetDeviceContext(dx);
|
mViewManager->GetDeviceContext(dx);
|
||||||
float scale = 1.0f / dx->AppUnitsPerDevPixel();
|
float scale = 1.0f / dx->AppUnitsPerDevPixel();
|
||||||
|
Loading…
Reference in New Issue
Block a user