Bug 1205399 - Fix OS X crash when no alert principal is passed. r=bustage

This commit is contained in:
Matthew Noorenberghe 2015-09-25 16:10:56 -07:00
parent 65fbfce580
commit 181f18eda9

View File

@ -248,7 +248,7 @@ OSXNotificationCenter::ShowAlertNotification(const nsAString & aImageUrl, const
notification.hasActionButton = NO;
// If this is not an application/extension alert, show additional actions dealing with permissions.
if (!nsContentUtils::IsSystemOrExpandedPrincipal(aPrincipal)
if (aPrincipal && !nsContentUtils::IsSystemOrExpandedPrincipal(aPrincipal)
&& !aPrincipal->GetIsNullPrincipal()) {
nsCOMPtr<nsIStringBundleService> sbs = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
nsCOMPtr<nsIStringBundle> bundle;