diff --git a/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java b/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java index be1e017631..4136e75e72 100644 --- a/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java +++ b/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java @@ -88,7 +88,8 @@ public class IncrementalChangesManager { if (!regionUpdateFiles.dayUpdates.isEmpty()) { ArrayList list = new ArrayList(regionUpdateFiles.dayUpdates.keySet()); for (String month : list) { - Iterator it = regionUpdateFiles.dayUpdates.get(month).iterator(); + List newList = new ArrayList<>(regionUpdateFiles.dayUpdates.get(month)); + Iterator it = newList.iterator(); RegionUpdate monthRu = regionUpdateFiles.monthUpdates.get(month); while (it.hasNext()) { RegionUpdate ru = it.next(); @@ -100,6 +101,7 @@ public class IncrementalChangesManager { log.info("Delete overlapping day update " + ru.file.getName()); } } + regionUpdateFiles.dayUpdates.put(month, newList); } } }