Guard agains empty notification

This commit is contained in:
Cheng Zhao 2015-08-04 16:44:32 +08:00
parent 81ba4e3a3e
commit bb7cd8f261

View file

@ -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);
}