From 90387a052d03b507da3cd59337930ee95c6e14f9 Mon Sep 17 00:00:00 2001 From: Bart Sopers Date: Fri, 20 Nov 2020 20:27:09 +0100 Subject: [PATCH] Prevent NPE --- .../plugins/pump/omnipod/driver/manager/PodStateManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java index d3519fd392..e92476d66a 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java @@ -369,7 +369,8 @@ public abstract class PodStateManager { } public final boolean isBasalCertain() { - return getSafe(() -> podState.isBasalCertain()); + Boolean certain = getSafe(() -> podState.isBasalCertain()); + return certain == null || certain; } public final void setBasalCertain(boolean certain) { @@ -711,7 +712,7 @@ public abstract class PodStateManager { private DeliveryStatus lastDeliveryStatus; private AlertSet activeAlerts; private BasalSchedule basalSchedule; - private boolean basalCertain; + private Boolean basalCertain; private DateTime lastBolusStartTime; private Double lastBolusAmount; private Duration lastBolusDuration;