Index: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java |
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java |
index ef1fd84de82d2e90bd4f5dac9c3128857ede198f..ea0a4dc75e16e83aa2bac105c6d28a49cfb069e8 100644 |
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java |
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java |
@@ -54,7 +54,9 @@ final class ChromeBluetoothRemoteGattCharacteristic { |
@CalledByNative |
private void onBluetoothRemoteGattCharacteristicAndroidDestruction() { |
Log.v(TAG, "ChromeBluetoothRemoteGattCharacteristic Destroyed."); |
- mChromeDevice.mBluetoothGatt.setCharacteristicNotification(mCharacteristic, false); |
+ if (mChromeDevice.mBluetoothGatt != null) { |
+ mChromeDevice.mBluetoothGatt.setCharacteristicNotification(mCharacteristic, false); |
+ } |
mNativeBluetoothRemoteGattCharacteristicAndroid = 0; |
mChromeDevice.mWrapperToChromeCharacteristicsMap.remove(mCharacteristic); |
} |