Changeset 6926 in josm for trunk


Ignore:
Timestamp:
2014-03-24T00:14:25+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #9817 - NPE when painting way with a single node

File:
1 edited

Legend:

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

    r6830 r6926  
    112112            if (idx == nodes.size() - 1) {
    113113                ++idx;
    114                 return new Point(x_prev0 + current.x - prev.x, y_prev0 + current.y - prev.y);
     114                if (prev != null) {
     115                    return new Point(x_prev0 + current.x - prev.x, y_prev0 + current.y - prev.y);
     116                } else {
     117                    return current;
     118                }
    115119            }
    116120
Note: See TracChangeset for help on using the changeset viewer.