Avoid potential crash

This commit is contained in:
Victor Shcherb 2018-05-26 11:25:57 +02:00
parent df88bf74be
commit be1bb0e257

View file

@ -161,10 +161,12 @@ public class IncrementalChangesManager {
if(date.endsWith("00")) { if(date.endsWith("00")) {
monthUpdates.put(monthYear, ru); monthUpdates.put(monthYear, ru);
} else { } else {
if (!dayUpdates.containsKey(monthYear)) { List<RegionUpdate> list = dayUpdates.get(monthYear);
dayUpdates.put(monthYear, new ArrayList<IncrementalChangesManager.RegionUpdate>()); if (list == null) {
list = new ArrayList<IncrementalChangesManager.RegionUpdate>();
} }
dayUpdates.get(monthYear).add(ru); list.add(ru);
dayUpdates.put(monthYear, list);
} }
return true; return true;
} }