1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-26 15:00:13 +02:00

Based on Play Store crash reports and stack traces, add a null check to try and avoid crashes

This commit is contained in:
Gordon Williams 2023-05-22 13:38:04 +01:00
parent 82778c46a5
commit 788cb15500

View File

@ -82,7 +82,8 @@ public class DeviceManager {
case BLUETOOTH_DEVICE_ACTION_ALIAS_CHANGED:
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
String newName = intent.getStringExtra(BluetoothDevice.EXTRA_NAME);
updateDeviceName(device, newName);
if (device!=null)
updateDeviceName(device, newName);
break;
case GBDevice.ACTION_DEVICE_CHANGED:
GBDevice dev = intent.getParcelableExtra(GBDevice.EXTRA_DEVICE);