Changeset 12183 in josm


Ignore:
Timestamp:
2017-05-15T19:31:59+02:00 (7 years ago)
Author:
michael2402
Message:

Allow null as parameter for BBox#add.

File:
1 edited

Legend:

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

    r12161 r12183  
    118118     * Add a point to an existing BBox. Extends this bbox if necessary so that this.bounds(c) will return true
    119119     * if c is a valid LatLon instance.
    120      * @param c a LatLon point
     120     * If it is invalid or <code>null</code>, this call is ignored.
     121     * @param c a LatLon point.
    121122     */
    122123    public final void add(ILatLon c) {
    123         add(c.lon(), c.lat());
     124        if (c != null) {
     125            add(c.lon(), c.lat());
     126        }
    124127    }
    125128
Note: See TracChangeset for help on using the changeset viewer.