From 3c8b7f10bec68fb872248f39451ef161ac7e4c15 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 9 Sep 2018 12:22:23 +0200 Subject: [PATCH] fix NPE --- .../plugins/NSClientInternal/services/NSClientService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java index 7e706af9b7..2066aaa423 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java @@ -324,7 +324,8 @@ public class NSClientService extends Service { return; } MainApp.bus().post(new EventNSClientNewLog("AUTH", "requesting auth")); - mSocket.emit("authorize", authMessage, ack); + if (mSocket != null) + mSocket.emit("authorize", authMessage, ack); } @Subscribe