diff --git a/widget/cocoa/OSXNotificationCenter.mm b/widget/cocoa/OSXNotificationCenter.mm index af0c98e2244..3ada98a7bd1 100644 --- a/widget/cocoa/OSXNotificationCenter.mm +++ b/widget/cocoa/OSXNotificationCenter.mm @@ -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 sbs = do_GetService(NS_STRINGBUNDLE_CONTRACTID); nsCOMPtr bundle;