Check whether Bluetooth adapter exists before trying to get address.

This commit is contained in:
akwizgran
2020-09-29 13:39:46 +01:00
parent 54b852db70
commit e9cdec95e0

View File

@@ -135,6 +135,7 @@ class AndroidBluetoothPlugin
@Override
@Nullable
String getBluetoothAddress() {
if (adapter == null) return null;
String address = AndroidUtils.getBluetoothAddress(app, adapter);
return address.isEmpty() ? null : address;
}