Bug 382471. Don't crash when wigets aren't present. patch by Eli Friedman, r+sr=roc

This commit is contained in:
roc+@cs.cmu.edu 2007-05-31 16:23:32 -07:00
parent e987b74e4a
commit 5216f20285

View File

@ -356,7 +356,7 @@ nsRect nsView::CalcWidgetBounds(nsWindowType aType)
nsIWidget* parentWidget = GetParent()->GetNearestWidget(&offset);
viewBounds += offset;
if (parentWidget && Type == eWindowType_popup &&
if (parentWidget && aType == eWindowType_popup &&
mVis == nsViewVisibility_kShow) {
nsRect screenRect(0,0,1,1);
parentWidget->WidgetToScreen(screenRect, screenRect);