зеркало из https://github.com/mozilla/pjs.git
bug 110620, r=aaronl, sr=brendan, a=blizzard/drivers
add null pointer check to avoid crash when we're called in unexpected ways.
This commit is contained in:
Родитель
d252600415
Коммит
dba7821c59
|
@ -368,7 +368,8 @@ NS_IMETHODIMP nsAccessibilityService::CreateXULImageAccessible(nsIDOMNode *aNode
|
|||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aNode));
|
||||
NS_ASSERTION(elt, "No DOM element or node!");
|
||||
if (NS_WARN_IF_FALSE(elt, "No DOM element or node!"))
|
||||
return NS_ERROR_FAILURE;
|
||||
PRBool hasTextEquivalent;
|
||||
elt->HasAttribute(NS_LITERAL_STRING("tooltiptext"), &hasTextEquivalent); // Prefer value over tooltiptext
|
||||
if (!hasTextEquivalent) {
|
||||
|
|
|
@ -368,7 +368,8 @@ NS_IMETHODIMP nsAccessibilityService::CreateXULImageAccessible(nsIDOMNode *aNode
|
|||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aNode));
|
||||
NS_ASSERTION(elt, "No DOM element or node!");
|
||||
if (NS_WARN_IF_FALSE(elt, "No DOM element or node!"))
|
||||
return NS_ERROR_FAILURE;
|
||||
PRBool hasTextEquivalent;
|
||||
elt->HasAttribute(NS_LITERAL_STRING("tooltiptext"), &hasTextEquivalent); // Prefer value over tooltiptext
|
||||
if (!hasTextEquivalent) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче