1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-29 03:55:49 +01:00

Avoid possible NPE

This commit is contained in:
cpfeiffer 2018-09-23 11:27:35 +02:00
parent 9e44a7ad6d
commit 60397c88c0

View File

@ -522,7 +522,9 @@ public final class BtLEQueue {
private void checkWaitingCharacteristic(BluetoothGattCharacteristic characteristic, int status) {
if (status != BluetoothGatt.GATT_SUCCESS) {
LOG.debug("failed btle action, aborting transaction: " + characteristic.getUuid() + getStatusString(status));
if (characteristic != null) {
LOG.debug("failed btle action, aborting transaction: " + characteristic.getUuid() + getStatusString(status));
}
mAbortTransaction = true;
}
if (characteristic != null && BtLEQueue.this.mWaitCharacteristic != null && characteristic.getUuid().equals(BtLEQueue.this.mWaitCharacteristic.getUuid())) {