Changeset 10919 in josm for trunk


Ignore:
Timestamp:
2016-08-31T16:12:28+02:00 (3 years ago)
Author:
simon04
Message:

fix #11852 - NPE in SearchCompiler

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r10794 r10919  
    14521452                LatLon coordinate = ((Node) osm).getCoor();
    14531453                Collection<Bounds> allBounds = getBounds(osm);
    1454                 return allBounds != null && allBounds.stream().anyMatch(bounds -> bounds.contains(coordinate));
     1454                return coordinate != null && allBounds != null && allBounds.stream().anyMatch(bounds -> bounds.contains(coordinate));
    14551455            } else if (osm instanceof Way) {
    14561456                Collection<Node> nodes = ((Way) osm).getNodes();
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r10829 r10919  
    7373    }
    7474
     75    /**
     76     * Returns lat/lon coordinates of this node, or {@code null} unless {@link #isLatLonKnown()}
     77     * @return lat/lon coordinates of this node, or {@code null} unless {@link #isLatLonKnown()}
     78     */
    7579    @Override
    7680    public LatLon getCoor() {
Note: See TracChangeset for help on using the changeset viewer.