bug 667396 - nsAccessibilityService::GetAccessibleFor() is an external api so we should NULL check the node argument r=surkov

This commit is contained in:
Trevor Saunders 2011-06-28 16:26:37 -07:00
parent cfb09d217c
commit db021c29e7

View File

@ -635,6 +635,9 @@ nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode,
nsIAccessible **aAccessible)
{
NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull;
if (!aNode)
return NS_OK;
nsCOMPtr<nsINode> node(do_QueryInterface(aNode));
NS_IF_ADDREF(*aAccessible = GetAccessible(node));