Bug 1148832 - Return early from nsAlertsIconListener::OnLoadComplete if the image has an error. r=baku, a=sledru

This commit is contained in:
Seth Fowler
2015-04-07 16:44:29 -07:00
parent 1ab4c289b7
commit a904f799c7

View File

@@ -137,7 +137,9 @@ nsAlertsIconListener::OnLoadComplete(imgIRequest* aRequest)
nsCOMPtr<imgIContainer> image;
rv = aRequest->GetImage(getter_AddRefs(image));
MOZ_ASSERT(image);
if (NS_WARN_IF(NS_FAILED(rv) || !image)) {
return rv;
}
// Ask the image to decode at its intrinsic size.
int32_t width = 0, height = 0;