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
This commit is contained in:
bzbarsky%mit.edu
2006-02-21 00:41:01 +00:00
parent 548d7ab242
commit ef47d880f1

View File

@@ -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