diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java index 34417735dd..82022fe163 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java @@ -364,6 +364,8 @@ public class IobCobCalculatorPlugin implements PluginBase { // check if data already exists long bgTime = bucketed_data.get(i).date; bgTime = roundUpTime(bgTime); + if (bgTime > System.currentTimeMillis()) + continue; Profile profile = MainApp.getConfigBuilder().getProfile(bgTime); AutosensData existing;