mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
Avoid NPEs when BluetoothDevice.getName() returns null
This commit is contained in:
parent
9881b6c281
commit
9ae69eac55
@ -59,7 +59,7 @@ public class GBDevice implements Parcelable {
|
||||
|
||||
public GBDevice(String address, String name, DeviceType deviceType) {
|
||||
mAddress = address;
|
||||
mName = name;
|
||||
mName = (name != null) ? name : mAddress;
|
||||
mDeviceType = deviceType;
|
||||
validate();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user