1
0
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:
OliE
2018-02-01 19:05:33 +01:00
parent 531d38be31
commit b21430d9fb

View File

@@ -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()) {