summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
index 05431778301c..2573907f95e5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
@@ -864,7 +864,7 @@ public class BluetoothUtils {
if (localBtManager == null) return null;
LocalBluetoothLeBroadcast broadcast =
localBtManager.getProfileManager().getLeAudioBroadcastProfile();
- if (!broadcast.isEnabled(null)) return null;
+ if (broadcast == null || !broadcast.isEnabled(null)) return null;
int primaryGroupId = getPrimaryGroupIdForBroadcast(contentResolver);
if (primaryGroupId == BluetoothCsipSetCoordinator.GROUP_ID_INVALID) return null;
LocalBluetoothLeBroadcastAssistant assistant =
@@ -883,4 +883,4 @@ public class BluetoothUtils {
}
return null;
}
-} \ No newline at end of file
+}