From 754ab85e59dbfc25f0576a1f5fc368c5e7754e49 Mon Sep 17 00:00:00 2001 From: "bryner%netscape.com" Date: Mon, 10 Jun 2002 23:16:08 +0000 Subject: [PATCH] Fix a crash scrolling the address list in the mail compose window (bug 142542). r=ben, sr=jag, a=valeski. git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@123016 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index b726f420d74..cf62cc1d49d 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;