diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 6827529f6f6f..d5f6d86c4821 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -635,6 +635,9 @@ nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode, nsIAccessible **aAccessible) { NS_ENSURE_ARG_POINTER(aAccessible); + *aAccessible = nsnull; + if (!aNode) + return NS_OK; nsCOMPtr node(do_QueryInterface(aNode)); NS_IF_ADDREF(*aAccessible = GetAccessible(node));