From d0391147e47e84efa13be0431728900e90555a2a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 13 Jan 2020 23:57:37 +0100 Subject: [PATCH] Fix NSClient crash --- .../androidaps/plugins/general/nsclient/NSClientPlugin.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.java index 290f51b6bb..804ea823e6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.java @@ -73,7 +73,7 @@ public class NSClientPlugin extends PluginBase { public NSClientService nsClientService = null; - private NsClientReceiverDelegate nsClientReceiverDelegate; + private NsClientReceiverDelegate nsClientReceiverDelegate = new NsClientReceiverDelegate(); @Inject public NSClientPlugin( @@ -115,7 +115,6 @@ public class NSClientPlugin extends PluginBase { protected void onStart() { paused = SP.getBoolean(R.string.key_nsclientinternal_paused, false); autoscroll = SP.getBoolean(R.string.key_nsclientinternal_autoscroll, true); - nsClientReceiverDelegate = new NsClientReceiverDelegate(); Context context = MainApp.instance().getApplicationContext(); Intent intent = new Intent(context, NSClientService.class);