mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 382471. Don't crash when wigets aren't present. patch by Eli Friedman, r+sr=roc
This commit is contained in:
parent
2ef14cf331
commit
e987b74e4a
@ -356,7 +356,8 @@ nsRect nsView::CalcWidgetBounds(nsWindowType aType)
|
||||
nsIWidget* parentWidget = GetParent()->GetNearestWidget(&offset);
|
||||
viewBounds += offset;
|
||||
|
||||
if (aType == eWindowType_popup && mVis == nsViewVisibility_kShow) {
|
||||
if (parentWidget && Type == eWindowType_popup &&
|
||||
mVis == nsViewVisibility_kShow) {
|
||||
nsRect screenRect(0,0,1,1);
|
||||
parentWidget->WidgetToScreen(screenRect, screenRect);
|
||||
viewBounds += nsPoint(NSIntPixelsToAppUnits(screenRect.x, p2a),
|
||||
|
Loading…
Reference in New Issue
Block a user