Changeset 5187 in josm for trunk


Ignore:
Timestamp:
2012-04-15T00:25:21+02:00 (8 years ago)
Author:
Don-vip
Message:

see #7567 - fix NPE with ways with incomplete nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r5059 r5187  
    581581        for (Node n:nodes) {
    582582            if (lastN != null) {
    583                 LatLon coor = n.getCoor();
    584                 if (coor != null) {
    585                     length += coor.greatCircleDistance(lastN.getCoor());
     583                LatLon lastNcoor = lastN.getCoor();
     584                LatLon coor = n.getCoor();
     585                if (lastNcoor != null && coor != null) {
     586                    length += coor.greatCircleDistance(lastNcoor);
    586587                }
    587588            }
Note: See TracChangeset for help on using the changeset viewer.