TDD 08 - fix crash on empty

This commit is contained in:
AdrianLxM 2018-03-19 20:23:45 +01:00
parent b6b7955dde
commit 088841ae23

View file

@ -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);
}