Don't pass null nodes to methods that don't expect them. Bug 329745,

r=timeless, sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2006-09-28 22:34:33 +00:00
parent 4336a5d2a5
commit 016ec858e3

View File

@ -272,6 +272,7 @@ nsContextMenuInfo::GetBackgroundImageRequest(nsIDOMNode *aDOMNode, imgIRequest *
nsCOMPtr<nsIDOMHTMLElement> body;
htmlDocument->GetBody(getter_AddRefs(body));
domNode = do_QueryInterface(body);
NS_ENSURE_TRUE(domNode, NS_ERROR_FAILURE);
}
}
return GetBackgroundImageRequestInternal(domNode, aRequest);