From 6495e8dc538610fb679df0f1522243103a3a1789 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 30 Jan 2018 17:43:58 +0100 Subject: [PATCH] On my system the notification is null It may be a bug, but we better not crash anyway --- plugins/notifications/notificationsdbusinterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/notifications/notificationsdbusinterface.cpp b/plugins/notifications/notificationsdbusinterface.cpp index 47e54a392..c0505c664 100644 --- a/plugins/notifications/notificationsdbusinterface.cpp +++ b/plugins/notifications/notificationsdbusinterface.cpp @@ -91,8 +91,11 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np) }); } } else { - QString pubId = m_internalIdToPublicId[id]; - Notification* noti = m_notifications[pubId]; + QString pubId = m_internalIdToPublicId.value(id); + Notification* noti = m_notifications.value(pubId); + if (!noti) + return; + noti->update(np); if (noti->isReady()) {