Bug 381219. nsIAlertsService on mac doesn' t check for if a listener has been allocated. r=gavin.sharp

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-05-18 18:10:19 -07:00
parent 6023cbbfcd
commit d2424e5434

View File

@ -144,6 +144,8 @@ nsAlertsService::ShowAlertNotification(const nsAString& aImageUrl,
nsCOMPtr<nsAlertsImageLoadListener> listener =
new nsAlertsImageLoadListener(name, aAlertTitle, aAlertText,
aAlertClickable, aAlertCookie, ind);
if (!listener)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr<nsIStreamLoader> loader;
rv = NS_NewStreamLoader(getter_AddRefs(loader), uri, listener);