diff --git a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index f8e19e0e239..0daded3af35 100644 --- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -544,7 +544,9 @@ NS_IMETHODIMP nsTreeBodyFrame::SetView(nsITreeView * aView) } // View, meet the tree. + nsWeakFrame weakFrame(this); mView->SetTree(mTreeBoxObject); + NS_ENSURE_STATE(weakFrame.IsAlive()); mView->GetRowCount(&mRowCount); PRBool isInReflow;