diff --git a/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java b/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java index 48ae30f6d2..6954e93a69 100644 --- a/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java @@ -435,7 +435,7 @@ public class TDDStatsActivity extends Activity { tl.setBackgroundColor(Color.TRANSPARENT); } - if(df.format(new Date(historyList.get(0).date)).equals(df.format(new Date()))) { + if(!historyList.isEmpty() && df.format(new Date(historyList.get(0).date)).equals(df.format(new Date()))) { //Today should not be included historyList.remove(0); }