diff --git a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java index c42a7c9b..f09175a3 100644 --- a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java +++ b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java @@ -433,6 +433,10 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver. service.cancelNotification(compatKey); } else { int first = compatKey.indexOf(':'); + if (first == -1) { + Log.e("cancelNotificationCompa","Not formated like a notification key: "+ compatKey); + return; + } int last = compatKey.lastIndexOf(':'); String packageName = compatKey.substring(0, first); String tag = compatKey.substring(first + 1, last);