null exception fix in danaconnection

This commit is contained in:
Milos Kozak 2016-07-13 20:39:32 +02:00
parent f2bdf4bcff
commit 2ca75b52e5

View file

@ -134,7 +134,7 @@ public class DanaConnection {
String action = intent.getAction(); String action = intent.getAction();
if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) {
log.debug("Device has disconnected " + device.getName());//Device has disconnected 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) { if (mRfcommSocket != null) {
try { try {
mInputStream.close(); mInputStream.close();