From f4b4cfc9de2250419097d8d6d4a43bd3c4f775ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Tue, 13 Dec 2022 21:50:05 +0000 Subject: [PATCH] [SG-870] Add null check on notification received (#2221) --- src/App/Services/PushNotificationListenerService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App/Services/PushNotificationListenerService.cs b/src/App/Services/PushNotificationListenerService.cs index cb7887fbf..b08a43f1c 100644 --- a/src/App/Services/PushNotificationListenerService.cs +++ b/src/App/Services/PushNotificationListenerService.cs @@ -141,7 +141,8 @@ namespace Bit.App.Services } // if there is a request modal opened ignore all incoming requests - if (App.Current.MainPage.Navigation.ModalStack.Any(p => p is NavigationPage navPage && navPage.CurrentPage is LoginPasswordlessPage)) + // App.Current can be null if the app is killed + if (App.Current != null && App.Current.MainPage.Navigation.ModalStack.Any(p => p is NavigationPage navPage && navPage.CurrentPage is LoginPasswordlessPage)) { return; }