From 2ca75b52e51c5d1c16a25b7a17b1add91521a0e3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 13 Jul 2016 20:39:32 +0200 Subject: [PATCH] null exception fix in danaconnection --- .../nightscout/androidaps/plugins/DanaR/DanaConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaConnection.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaConnection.java index 8cfb26ab51..3a5fa51618 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaConnection.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaConnection.java @@ -134,7 +134,7 @@ public class DanaConnection { String action = intent.getAction(); if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { log.debug("Device has disconnected " + device.getName());//Device has disconnected - if (mDevice.getName().equals(device.getName())) { + if (mDevice != null && mDevice.getName().equals(device.getName())) { if (mRfcommSocket != null) { try { mInputStream.close();