From bb7cd8f26128fb2207df4fd888885279e0a95c5a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 4 Aug 2015 16:44:32 +0800 Subject: [PATCH] Guard agains empty notification --- brightray/browser/linux/notification_presenter_linux.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brightray/browser/linux/notification_presenter_linux.cc b/brightray/browser/linux/notification_presenter_linux.cc index db9c67d3c892..557e527047d4 100644 --- a/brightray/browser/linux/notification_presenter_linux.cc +++ b/brightray/browser/linux/notification_presenter_linux.cc @@ -153,12 +153,16 @@ void NotificationPresenterLinux::DeleteNotification(NotifyNotification* notifica } void NotificationPresenterLinux::OnNotificationClosed(NotifyNotification* notification) { + if (!notification) + return; GetDelegateFromNotification(notification)->NotificationClosed(); DeleteNotification(notification); } void NotificationPresenterLinux::OnNotificationView( NotifyNotification* notification, char* action) { + if (!notification) + return; GetDelegateFromNotification(notification)->NotificationClick(); DeleteNotification(notification); }