Prevent NPE

This commit is contained in:
Bart Sopers 2020-11-20 20:27:09 +01:00
parent 1eedf86fa1
commit 90387a052d

View file

@ -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;