diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index 0b2adedb9cd..a6a641b5f0e 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -533,6 +533,7 @@ nsTreeBodyFrame::Destroy(nsIPresContext* aPresContext) mColumns = nsnull; // Save off our info into the box object. + EnsureBoxObject(); if (mTreeBoxObject) { nsCOMPtr box(do_QueryInterface(mTreeBoxObject)); if (mTopRowIndex > 0) { @@ -564,7 +565,8 @@ nsTreeBodyFrame::EnsureBoxObject() if (parent) { nsCOMPtr parentDoc; parent->GetDocument(*getter_AddRefs(parentDoc)); - NS_ASSERTION(parentDoc, "element has no document!"); + if (!parentDoc) // there may be no document, if we're called from Destroy() + return; nsCOMPtr nsDoc = do_QueryInterface(parentDoc); nsCOMPtr box;