Bugfix: NPE fix

RSC calls isConnected() from handler's post() which could execute after
the service was destroyed.
This commit is contained in:
Aleksander Nowakowski
2017-11-03 17:36:32 +01:00
parent 7a81c7bca0
commit a22f9eb17a

View File

@@ -587,6 +587,6 @@ public abstract class BleProfileService extends Service implements BleManagerCal
* @return <code>true</code> if device is connected to the sensor, <code>false</code> otherwise
*/
protected boolean isConnected() {
return mBleManager.isConnected();
return mBleManager != null && mBleManager.isConnected();
}
}