Quellcode durchsuchen

[Android] Fix NullPointerException in AudioModeModule

master
Lyubo Marinov vor 8 Jahren
Ursprung
Commit
81094ba7fd
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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 Datei anzeigen

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

Laden…
Abbrechen
Speichern