fix NPE
This commit is contained in:
parent
d2f8cfa6c2
commit
294253797c
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue