Fix ConcurrentModificationException

This commit is contained in:
Alexander Sytnyk 2018-02-06 16:53:40 +02:00
parent 10ae4afd90
commit df1bed0f4b

View file

@ -365,7 +365,8 @@ public class GpxSelectionHelper {
} }
public SelectedGpxFile getSelectedFileByPath(String path) { public SelectedGpxFile getSelectedFileByPath(String path) {
for (SelectedGpxFile s : selectedGPXFiles) { List<SelectedGpxFile> newList = new ArrayList<>(selectedGPXFiles);
for (SelectedGpxFile s : newList) {
if (s.getGpxFile().path.equals(path)) { if (s.getGpxFile().path.equals(path)) {
return s; return s;
} }