diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java index e59869215..6b9dff69d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java @@ -60,6 +60,11 @@ public class WorkoutSummaryParser extends XiaomiActivityParser implements Activi return false; } + // parseBinaryData may return null in case the version is not supported + if (summary == null) { + return false; + } + summary.setSummaryData(null); // remove json before saving to database try (DBHandler dbHandler = GBApplication.acquireDB()) {