Fix a crash scrolling the address list in the mail compose window (bug 142542). r=ben, sr=jag, a=asa.
git-svn-id: svn://10.0.0.236/trunk@122935 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
13770b909f
commit
83e4f8d0ae
@ -533,6 +533,7 @@ nsTreeBodyFrame::Destroy(nsIPresContext* aPresContext)
|
||||
mColumns = nsnull;
|
||||
|
||||
// Save off our info into the box object.
|
||||
EnsureBoxObject();
|
||||
if (mTreeBoxObject) {
|
||||
nsCOMPtr<nsIBoxObject> box(do_QueryInterface(mTreeBoxObject));
|
||||
if (mTopRowIndex > 0) {
|
||||
@ -564,7 +565,8 @@ nsTreeBodyFrame::EnsureBoxObject()
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIDocument> 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<nsIDOMNSDocument> nsDoc = do_QueryInterface(parentDoc);
|
||||
nsCOMPtr<nsIBoxObject> box;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user