From d2424e54348eb5671b721cfa25f242968a58a52f Mon Sep 17 00:00:00 2001 From: "sdwilsh@shawnwilsher.com" Date: Fri, 18 May 2007 18:10:19 -0700 Subject: [PATCH] Bug 381219. nsIAlertsService on mac doesn' t check for if a listener has been allocated. r=gavin.sharp --- toolkit/components/alerts/src/mac/nsAlertsService.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolkit/components/alerts/src/mac/nsAlertsService.mm b/toolkit/components/alerts/src/mac/nsAlertsService.mm index c3fd39320e8d..0f417c989a4a 100644 --- a/toolkit/components/alerts/src/mac/nsAlertsService.mm +++ b/toolkit/components/alerts/src/mac/nsAlertsService.mm @@ -144,6 +144,8 @@ nsAlertsService::ShowAlertNotification(const nsAString& aImageUrl, nsCOMPtr listener = new nsAlertsImageLoadListener(name, aAlertTitle, aAlertText, aAlertClickable, aAlertCookie, ind); + if (!listener) + return NS_ERROR_OUT_OF_MEMORY; nsCOMPtr loader; rv = NS_NewStreamLoader(getter_AddRefs(loader), uri, listener);