From 804f5a843ceb2b8498f838f2a56a5f16e36fc381 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Mon, 28 Mar 2011 22:59:17 +0900 Subject: [PATCH] Bug 628603 - Crash in nsDocAccessible::CacheChildrenInSubtree [@ nsAccessNode::IsContent() ], r=davidb, a=blocking2.x+ --- accessible/src/base/nsDocAccessible.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accessible/src/base/nsDocAccessible.cpp b/accessible/src/base/nsDocAccessible.cpp index 4f2909bec93..91774bfa635 100644 --- a/accessible/src/base/nsDocAccessible.cpp +++ b/accessible/src/base/nsDocAccessible.cpp @@ -1953,8 +1953,9 @@ nsDocAccessible::CacheChildrenInSubtree(nsAccessible* aRoot) PRUint32 count = aRoot->GetChildCount(); for (PRUint32 idx = 0; idx < count; idx++) { nsAccessible* child = aRoot->GetChildAt(idx); + NS_ASSERTION(child, "Illicit tree change while tree is created!"); // Don't cross document boundaries. - if (child->IsContent()) + if (child && child->IsContent()) CacheChildrenInSubtree(child); } }