From 5884370c127cc7a24d4320bdfd64fd1e5b4473b2 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Sat, 16 May 2020 01:01:55 +0200 Subject: [PATCH] Null check for the notification parent view (#3381) --- .../mozilla/vrbrowser/ui/widgets/NotificationManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NotificationManager.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NotificationManager.java index ef8a47dd1..e9cd73506 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NotificationManager.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NotificationManager.java @@ -166,7 +166,10 @@ public static void show(int notificationId, @NonNull Notification notification) } Runnable hideTask = () -> hide(notificationId); - notification.mView.postDelayed(hideTask, notification.mDuration); + + if (notification.mView != null) { + notification.mView.postDelayed(hideTask, notification.mDuration); + } mData.put(notificationId, new NotificationData(notificationView, notification, hideTask)); }