From 82b42fda67d53ab96d12bcb8d39471e5507d3b67 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Wed, 24 May 2017 00:23:57 +0200 Subject: [PATCH] Fix NPE --- .../Plugins/NotificationsPlugin/NotificationsPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java index e983bc4f..740cb2c5 100644 --- a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java +++ b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java @@ -120,6 +120,10 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver. @Override public void onNotificationRemoved(StatusBarNotification statusBarNotification) { + if (statusBarNotification == null) { + Log.w("onNotificationRemoved", "notification is null"); + return; + } String id = getNotificationKeyCompat(statusBarNotification); NetworkPackage np = new NetworkPackage(PACKAGE_TYPE_NOTIFICATION); np.set("id", id);