From a8d85b5ccf66c3849239554bc61dcab3c6b51525 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Wed, 2 May 2018 17:29:59 +0300 Subject: [PATCH] Fix ConcurrentModificationException --- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index fd8717e424..ed5201b7bd 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -544,7 +544,8 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex int r = getDefaultRadiusPoi(tb); int ex = (int) point.x; int ey = (int) point.y; - for (SelectedGpxFile g : selectedGpxHelper.getSelectedGPXFiles()) { + List selectedGpxFiles = new ArrayList<>(selectedGpxHelper.getSelectedGPXFiles()); + for (SelectedGpxFile g : selectedGpxFiles) { List pts = getListStarPoints(g); // int fcolor = g.getColor() == 0 ? clr : g.getColor(); for (WptPt n : pts) {