diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java index ee877c8260..652ec856bd 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java @@ -34,8 +34,8 @@ public class DetermineBasalResultAMA extends APSResult { duration = -1; } else { reason = result.getString("reason"); - eventualBG = result.getDouble("eventualBG"); - snoozeBG = result.getDouble("snoozeBG"); + if (result.contains("eventualBG")) eventualBG = result.getDouble("eventualBG"); + if (result.contains("snoozeBG")) snoozeBG = result.getDouble("snoozeBG"); if (result.contains("rate")) { rate = result.getDouble("rate"); if (rate < 0d) rate = 0d;