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