mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-22 16:23:09 +02:00
check if device is not null
This commit is contained in:
@@ -84,6 +84,10 @@ public class BluetoothPreferences extends PreferenceFragment implements SharedPr
|
||||
//bluetooth device found
|
||||
BluetoothDevice device = (BluetoothDevice) intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||
|
||||
if (device.getName() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
foundDevices.put(device.getAddress(), device.getName());
|
||||
|
||||
for (Map.Entry<String, String> entry : foundDevices.entrySet()) {
|
||||
|
Reference in New Issue
Block a user