Changeset 4683 in josm for trunk/src/org


Ignore:
Timestamp:
2011-12-21T12:49:58+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #7173 - Unexpected Exception when purging a way in a Multipolygon

File:
1 edited

Legend:

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

    r4667 r4683  
    295295                    List<Way> waysToJoin = new ArrayList<Way>();
    296296                    for (Iterator<Long> it = wayIds.iterator(); it.hasNext(); ) {
    297                         waysToJoin.add((Way) ds.getPrimitiveById(it.next(), OsmPrimitiveType.WAY));
     297                        Way w = (Way) ds.getPrimitiveById(it.next(), OsmPrimitiveType.WAY);
     298                        if (w != null && w.getNodesCount() > 0) { // fix #7173 (empty ways on purge)
     299                            waysToJoin.add(w);
     300                        }
    298301                    }
    299302                    nodes.addAll(joinWays(waysToJoin).iterator().next().getNodes());
Note: See TracChangeset for help on using the changeset viewer.