From c6a14440faac0b3293a8457025f890f5016400ea Mon Sep 17 00:00:00 2001 From: "marco.zehe@googlemail.com" Date: Thu, 24 Apr 2008 23:34:02 -0700 Subject: [PATCH] bug 429617 - Crash [@ nsAccessNode::ClearCacheEntry(void const*, nsCOMPtr&, void*) ] r=surkov a1.9=beltzner --- accessible/src/base/nsAccessNode.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/accessible/src/base/nsAccessNode.cpp b/accessible/src/base/nsAccessNode.cpp index fcd756a9a6d..eb69339ed2a 100755 --- a/accessible/src/base/nsAccessNode.cpp +++ b/accessible/src/base/nsAccessNode.cpp @@ -794,8 +794,11 @@ nsAccessNode::GetCacheEntry(nsAccessNodeHashtable& aCache, PLDHashOperator nsAccessNode::ClearCacheEntry(const void* aKey, nsCOMPtr& aAccessNode, void* aUserArg) { - nsCOMPtr privateAccessNode(do_QueryInterface(aAccessNode)); - privateAccessNode->Shutdown(); + NS_ASSERTION(!aAccessNode, "Calling ClearCacheEntry with a NULL pointer!"); + if (aAccessNode) { + nsCOMPtr privateAccessNode(do_QueryInterface(aAccessNode)); + privateAccessNode->Shutdown(); + } return PL_DHASH_REMOVE; }