Changeset 643 in josm


Ignore:
Timestamp:
2008-05-19T02:20:32+02:00 (12 years ago)
Author:
framm
Message:
  • fix NPE on Node.equals reported in bug #767
File:
1 edited

Legend:

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

    r627 r643  
    5454
    5555        @Override public boolean realEqual(OsmPrimitive osm, boolean semanticOnly) {
    56                 return osm instanceof Node ? super.realEqual(osm, semanticOnly) && coor.equals(((Node)osm).coor) : false;
     56                if (osm instanceof Node) {
     57            if (super.realEqual(osm, semanticOnly)) {
     58                if ((coor == null) && ((Node)osm).coor == null)
     59                    return true;
     60                if (coor != null)
     61                    return coor.equals(((Node)osm).coor);
     62            }
     63        }
     64        return false;
    5765    }
    5866
Note: See TracChangeset for help on using the changeset viewer.