diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphData/GraphData.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphData/GraphData.java index 30ed626b89..139aa6e30f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphData/GraphData.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphData/GraphData.java @@ -331,6 +331,8 @@ public class GraphData { } private double getNearestBg(long date) { + if (bgReadingsArray == null) + return Profile.fromMgdlToUnits(100, units); for (int r = 0; r < bgReadingsArray.size(); r++) { BgReading reading = bgReadingsArray.get(r); if (reading.date > date) continue;