From dbb47351dd8d40b9237e1a6c263beda91160cb74 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 8 Oct 2023 21:27:19 +0200 Subject: [PATCH] Fix a crash (I have that with a device I am working on) --- .../freeyourgadget/gadgetbridge/impl/GBDeviceCandidate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceCandidate.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceCandidate.java index e9a044364..ad59c48bd 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceCandidate.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDeviceCandidate.java @@ -162,7 +162,7 @@ public class GBDeviceCandidate implements Parcelable, Cloneable { public boolean supportsService(UUID aService) { ParcelUuid[] uuids = getServiceUuids(); - if (uuids.length == 0) { + if (uuids == null || uuids.length == 0) { LOG.warn("no cached services available for " + this); return false; }