From df1bed0f4b021e13c9e75413646891ab2e7b45c6 Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Tue, 6 Feb 2018 16:53:40 +0200 Subject: [PATCH] Fix ConcurrentModificationException --- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 3cf44fe0a8..6ba585b79f 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -365,7 +365,8 @@ public class GpxSelectionHelper { } public SelectedGpxFile getSelectedFileByPath(String path) { - for (SelectedGpxFile s : selectedGPXFiles) { + List newList = new ArrayList<>(selectedGPXFiles); + for (SelectedGpxFile s : newList) { if (s.getGpxFile().path.equals(path)) { return s; }