From be900f13d83cbdcf38ea6b499be58ca8d2f443a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Fri, 2 Dec 2022 21:13:25 +0000 Subject: [PATCH] Zepp OS: Fix NPE when no weather data is available --- .../gadgetbridge/service/devices/huami/Huami2021Weather.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021Weather.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021Weather.java index 1751652b2..7f228446d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021Weather.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021Weather.java @@ -59,7 +59,7 @@ public class Huami2021Weather { if (weatherSpec == null) { LOG.error("No weather in weather instance"); - return null; + return new Huami2021Weather.ErrorResponse(404, -2001, "Not found"); } switch (path) {