Ignore:
Timestamp:
2010-03-23T21:09:17+01:00 (14 years ago)
Author:
jttt
Message:

Return copy of bbox in Way.getBBox (to make sure internal copy won't be modified)

File:
1 edited

Legend:

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

    r3117 r3153  
    334334    @Override
    335335    public BBox getBBox() {
     336        if (members.isEmpty())
     337            return new BBox(0, 0, 0, 0);
    336338        if (getDataSet() == null)
    337339            return calculateBBox(new HashSet<PrimitiveId>());
     
    339341            if (bbox == null) {
    340342                bbox = calculateBBox(new HashSet<PrimitiveId>());
    341                 if (bbox == null) {
    342                     bbox = new BBox(0, 0, 0, 0); // No members
    343                 }
    344             }
    345             return  bbox;
     343            }
     344            return new BBox(bbox);
    346345        }
    347346    }
Note: See TracChangeset for help on using the changeset viewer.