Bug 505835. nsTreeBodyFrame::ReflowFinished should null check return value of GetBaseElement. r=neil
☠☠ backed out by e69034463eeb ☠ ☠
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 10 Apr 2010 13:03:40 -0500
changeset 40649 02e8391669c3975821e20d9a5485eaa27cf0a39d
parent 40648 3a27158cbdd697fe5528658c4676cea537e50b6a
child 40650 761790684f3be4ebb9c30895d1864dbd12516a9a
child 40676 e69034463eebbd368322b97559b4ae95b7722aaf
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs505835
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 505835. nsTreeBodyFrame::ReflowFinished should null check return value of GetBaseElement. r=neil
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -438,17 +438,18 @@ nsTreeBodyFrame::ReflowFinished()
       mPageLength = mInnerBox.height / mRowHeight;
     }
 
     PRInt32 lastPageTopRow = NS_MAX(0, mRowCount - mPageLength);
     if (mTopRowIndex > lastPageTopRow)
       ScrollToRowInternal(parts, lastPageTopRow);
 
     nsIContent *treeContent = GetBaseElement();
-    if (treeContent->AttrValueIs(kNameSpaceID_None,
+    if (treeContent &&
+        treeContent->AttrValueIs(kNameSpaceID_None,
                                  nsGkAtoms::keepcurrentinview,
                                  nsGkAtoms::_true, eCaseMatters)) {
       // make sure that the current selected item is still
       // visible after the tree changes size.
       nsCOMPtr<nsITreeSelection> sel;
       mView->GetSelection(getter_AddRefs(sel));
       if (sel) {
         PRInt32 currentIndex;