Changeset 6062 in josm for trunk/src


Ignore:
Timestamp:
2013-07-12T00:56:44+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8866 - NoSuchElementException after deleting an empty relation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r5828 r6062  
    230230    @Override
    231231    public boolean isFixable(TestError testError) {
    232         return testError.getCode() == RELATION_EMPTY && testError.getPrimitives().iterator().next().isNew();
     232        Collection<? extends OsmPrimitive> primitives = testError.getPrimitives();
     233        return testError.getCode() == RELATION_EMPTY && !primitives.isEmpty() && primitives.iterator().next().isNew();
    233234    }
    234235}
Note: See TracChangeset for help on using the changeset viewer.