Bug 765195 - crash in nsXULTreeAccessible::TreeViewInvalidated, r=tbsaunde
authorMark Capella <markcapella@twcny.rr.com>
Sat, 16 Jun 2012 13:12:58 -0400
changeset 99609 7504d07db7abfe5e3b6226f09d1fb98d1c04d7eb
parent 99608 1a625cb42f580c0cb6fd1f17d48c53f0d4adacfd
child 99610 6291213e96eec5b39135cbe3cbb6ab00c7dcf93f
push idunknown
push userunknown
push dateunknown
reviewerstbsaunde
bugs765195
milestone16.0a1
Bug 765195 - crash in nsXULTreeAccessible::TreeViewInvalidated, r=tbsaunde
accessible/src/xul/XULTreeAccessible.cpp
--- a/accessible/src/xul/XULTreeAccessible.cpp
+++ b/accessible/src/xul/XULTreeAccessible.cpp
@@ -606,16 +606,21 @@ XULTreeAccessible::InvalidateCache(PRInt
 
 void
 XULTreeAccessible::TreeViewInvalidated(PRInt32 aStartRow, PRInt32 aEndRow,
                                        PRInt32 aStartCol, PRInt32 aEndCol)
 {
   if (IsDefunct())
     return;
 
+  if (!mTreeView) {
+    ClearCache(mAccessibleCache);
+    return;
+  }
+
   PRInt32 endRow = aEndRow;
 
   nsresult rv;
   if (endRow == -1) {
     PRInt32 rowCount = 0;
     rv = mTreeView->GetRowCount(&rowCount);
     if (NS_FAILED(rv))
       return;