bug 1281971 - Fix null pointer access in TryToStartImageLoadOnValue. r=dholbert

MozReview-Commit-ID: 6FAXlMb8iQr

--HG--
extra : rebase_source : 92e09dbb637403dd93da7ee16243da80976cff6c
This commit is contained in:
cku 2016-06-25 00:52:20 +08:00
parent 6ab940e68e
commit 0ae824a629

View File

@ -71,10 +71,12 @@ TryToStartImageLoadOnValue(const nsCSSValue& aValue, nsIDocument* aDocument,
if (aProperty == eCSSProperty_mask_image) {
nsIURI* docURI = aDocument->GetDocumentURI();
nsIURI* imageURI = aValue.GetURLValue();
bool isEqualExceptRef = false;
nsresult rv = imageURI->EqualsExceptRef(docURI, &isEqualExceptRef);
if (NS_SUCCEEDED(rv) && isEqualExceptRef) {
return;
if (imageURI) {
bool isEqualExceptRef = false;
nsresult rv = imageURI->EqualsExceptRef(docURI, &isEqualExceptRef);
if (NS_SUCCEEDED(rv) && isEqualExceptRef) {
return;
}
}
}
#endif