From 75192f0372880d1baec86b58384eba17966a6111 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 7 Jan 2017 23:38:59 +0100 Subject: [PATCH] prevent logging exception --- .../persistentnotification/PersistentNotificationPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/persistentnotification/PersistentNotificationPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/persistentnotification/PersistentNotificationPlugin.java index dffe461ead..653bc6e7b6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/persistentnotification/PersistentNotificationPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/persistentnotification/PersistentNotificationPlugin.java @@ -176,7 +176,9 @@ public class PersistentNotificationPlugin implements PluginBase{ if(fragmentEnabled){ MainApp.bus().register(this); } else { - MainApp.bus().unregister(this); + try { + MainApp.bus().unregister(this); + } catch (Exception e) {} } }