1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 14:32:54 +01:00

Prevent GBDeviceCandidate from ever being null

Prevents other crashes such as dbb47351d
This commit is contained in:
José Rebelo 2023-10-08 21:44:59 +01:00
parent ad42255ea1
commit 9dde497b07

View File

@ -58,7 +58,7 @@ public class GBDeviceCandidate implements Parcelable, Cloneable {
public GBDeviceCandidate(BluetoothDevice device, short rssi, ParcelUuid[] serviceUuids) { public GBDeviceCandidate(BluetoothDevice device, short rssi, ParcelUuid[] serviceUuids) {
this.device = device; this.device = device;
this.rssi = rssi; this.rssi = rssi;
this.serviceUuids = serviceUuids; this.serviceUuids = serviceUuids != null ? serviceUuids : new ParcelUuid[0];
} }
private GBDeviceCandidate(Parcel in) { private GBDeviceCandidate(Parcel in) {