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")) {
monthUpdates.put(monthYear, ru);
} else {
if (!dayUpdates.containsKey(monthYear)) {
dayUpdates.put(monthYear, new ArrayList<IncrementalChangesManager.RegionUpdate>());
List<RegionUpdate> list = dayUpdates.get(monthYear);
if (list == null) {
list = new ArrayList<IncrementalChangesManager.RegionUpdate>();
}
dayUpdates.get(monthYear).add(ru);
list.add(ru);
dayUpdates.put(monthYear, list);
}
return true;
}