mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Lookup the view again since WillPaint() might lead to its destruction. b=378273 r+sr=roc
This commit is contained in:
parent
731778235e
commit
a8c8911056
@ -1215,6 +1215,10 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
||||
BeginUpdateViewBatch();
|
||||
observer->WillPaint();
|
||||
EndUpdateViewBatch(NS_VMREFRESH_NO_SYNC);
|
||||
|
||||
// Get the view pointer again since the code above might have
|
||||
// destroyed it (bug 378273).
|
||||
view = nsView::GetViewFor(aEvent->widget);
|
||||
}
|
||||
}
|
||||
// Make sure to sync up any widget geometry changes we
|
||||
@ -1222,8 +1226,11 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
||||
if (rootVM->mHasPendingUpdates) {
|
||||
rootVM->ProcessPendingUpdates(mRootView, PR_FALSE);
|
||||
}
|
||||
Refresh(view, event->renderingContext, region,
|
||||
NS_VMREFRESH_DOUBLE_BUFFER);
|
||||
|
||||
if (view) {
|
||||
Refresh(view, event->renderingContext, region,
|
||||
NS_VMREFRESH_DOUBLE_BUFFER);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// since we got an NS_PAINT event, we need to
|
||||
|
Loading…
Reference in New Issue
Block a user