fix NPE ActionStringHandler

This commit is contained in:
Milos Kozak 2019-04-09 12:51:06 +02:00
parent 398868f34b
commit a75c60f573

View file

@ -625,10 +625,12 @@ public class ActionStringHandler {
} }
generateTempTarget(duration, low, high); generateTempTarget(duration, low, high);
} else if ("wizard2".equals(act[0])) { } else if ("wizard2".equals(act[0])) {
if (lastBolusWizard != null) {
//use last calculation as confirmed string matches //use last calculation as confirmed string matches
doBolus(lastBolusWizard.calculatedTotalInsulin, lastBolusWizard.carbs); doBolus(lastBolusWizard.calculatedTotalInsulin, lastBolusWizard.carbs);
lastBolusWizard = null; lastBolusWizard = null;
}
} else if ("bolus".equals(act[0])) { } else if ("bolus".equals(act[0])) {
double insulin = SafeParse.stringToDouble(act[1]); double insulin = SafeParse.stringToDouble(act[1]);
int carbs = SafeParse.stringToInt(act[2]); int carbs = SafeParse.stringToInt(act[2]);