Browse Source

[Android] Fix NullPointerException in AudioModeModule

master
Lyubo Marinov 8 years ago
parent
commit
81094ba7fd
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java

+ 1
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java View File

@@ -299,7 +299,7 @@ class AudioModeModule extends ReactContextBaseJavaModule {
299 299
      * Only used on Android < M. Runs on the main thread.
300 300
      */
301 301
     void onBluetoothDeviceChange() {
302
-        if (bluetoothHeadsetMonitor.isHeadsetAvailable()) {
302
+        if (bluetoothHeadsetMonitor != null && bluetoothHeadsetMonitor.isHeadsetAvailable()) {
303 303
             availableDevices.add(DEVICE_BLUETOOTH);
304 304
         } else {
305 305
             availableDevices.remove(DEVICE_BLUETOOTH);

Loading…
Cancel
Save