Bug 423726 - Crash [ @ GetAttributesInternal() ], patch=aaronlev, r=me, a=mtschrep
authorsurkov.alexander@gmail.com
Wed, 19 Mar 2008 18:55:26 -0700
changeset 13351 b4a0dc4db376ca22f74c173c3ab5a8924a640540
parent 13350 42cda9062d59238d96334d0a4bb08617b46e2ae1
child 13352 631f90312ecd4e827e06d892e0dec265ba994400
push idunknown
push userunknown
push dateunknown
reviewersme, mtschrep
bugs423726
milestone1.9b5pre
Bug 423726 - Crash [ @ GetAttributesInternal() ], patch=aaronlev, r=me, a=mtschrep
accessible/src/base/nsAccessible.cpp
--- a/accessible/src/base/nsAccessible.cpp
+++ b/accessible/src/base/nsAccessible.cpp
@@ -2187,16 +2187,18 @@ nsAccessible::GetAttributesInternal(nsIP
     nsIContent *topContent = GetRoleContent(docNode);
     NS_ENSURE_STATE(topContent);
     nsAccUtils::GetLiveContainerAttributes(aAttributes, startContent, topContent);
     // Allow ARIA live region markup from outer documents to override
     nsCOMPtr<nsISupports> container = doc->GetContainer();
     nsIDocShellTreeItem *docShellTreeItem = nsnull;
     if (container)
       CallQueryInterface(container, &docShellTreeItem);
+    if (!docShellTreeItem)
+      break;
     nsIDocShellTreeItem *sameTypeParent = nsnull;
     docShellTreeItem->GetSameTypeParent(&sameTypeParent);
     if (!sameTypeParent || sameTypeParent == docShellTreeItem)
       break;
     nsIDocument *parentDoc = doc->GetParentDocument();
     startContent = parentDoc->FindContentForSubDocument(doc);      
   }