prevent NPE

This commit is contained in:
Milos Kozak 2021-01-15 13:34:05 +01:00
parent fda2bb6188
commit 534b27cb71

View file

@ -473,6 +473,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
for (long i = time - range(); i < time; i += T.mins(5).msecs()) { for (long i = time - range(); i < time; i += T.mins(5).msecs()) {
Profile profile = profileFunction.getProfile(i); Profile profile = profileFunction.getProfile(i);
if (profile == null) continue;
double basal = profile.getBasal(i); double basal = profile.getBasal(i);
TemporaryBasal runningTBR = getTempBasalFromHistory(i); TemporaryBasal runningTBR = getTempBasalFromHistory(i);
double running = basal; double running = basal;