Fixed handling of null profile

This commit is contained in:
Paulus 2019-07-13 10:26:15 +02:00
parent fc1dd360b3
commit d7cb84e693

View file

@ -359,8 +359,8 @@ public class GraphData {
for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) {
Profile profile = ProfileFunctions.getInstance().getProfile(time);
double act = 0d;
if (profile != null)
total = iobCobCalculatorPlugin.calculateFromTreatmentsAndTempsSynchronized(time, profile);
if (profile == null) continue;
total = iobCobCalculatorPlugin.calculateFromTreatmentsAndTempsSynchronized(time, profile);
act = total.activity;
if(time<=now)