From ef47d880f1cd285b01c3f880fa8ec705bd587eb2 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 21 Feb 2006 00:41:01 +0000 Subject: [PATCH] Fix bug 326998 -- not every box has a box parent. r+sr+branch181=roc git-svn-id: svn://10.0.0.236/trunk@190632 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/xul/base/src/nsBoxFrame.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index f0375c893cc..ce55323bf9a 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -1311,8 +1311,12 @@ nsBoxFrame::AttributeChanged(PRInt32 aNameSpaceID, nsIBox* parent; GetParentBox(&parent); - parent->RelayoutChildAtOrdinal(state, this); - parent->MarkDirty(state); + // If our parent is not a box, there's not much we can do... but in that + // case our ordinal doesn't matter anyway, so that's ok. + if (parent) { + parent->RelayoutChildAtOrdinal(state, this); + parent->MarkDirty(state); + } } // If the accesskey changed, register for the new value // The old value has been unregistered in nsXULElement::SetAttr