Ignore:
Timestamp:
2014-08-27T17:40:39+02:00 (10 years ago)
Author:
bastiK
Message:

fixed #10425 - ConcurrentModificationException when auto update mappaint file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r7423 r7447  
    6969import org.openstreetmap.josm.gui.mappaint.StyleCache.StyleList;
    7070import org.openstreetmap.josm.gui.mappaint.TextElement;
     71import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
    7172import org.openstreetmap.josm.gui.mappaint.mapcss.Selector;
    7273import org.openstreetmap.josm.tools.CompositeList;
     
    13421343        @Override
    13431344        public List<StyleRecord> call() throws Exception {
    1344             for (int i = from; i<to; i++) {
    1345                 OsmPrimitive osm = input.get(i);
    1346                 if (osm.isDrawable()) {
    1347                     osm.accept(this);
    1348                 }
    1349             }
    1350             return output;
     1345            synchronized (MapCSSStyleSource.STYLE_SOURCE_LOCK) {
     1346                for (int i = from; i<to; i++) {
     1347                    OsmPrimitive osm = input.get(i);
     1348                    if (osm.isDrawable()) {
     1349                        osm.accept(this);
     1350                    }
     1351                }
     1352                return output;
     1353            }
    13511354        }
    13521355
Note: See TracChangeset for help on using the changeset viewer.