Ignore:
Timestamp:
2018-06-10T18:30:24+02:00 (7 years ago)
Author:
donvip
Message:

fix #josm16370 - NoSuchElementException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceMembershipAction.java

    r33579 r34263  
    4343
    4444        final ReplaceGeometryCommand command = getReplaceGeometryCommand(firstObject, secondObject);
    45         final int affectedRelations = command.getChildren().size();
     45        final int affectedRelations = command != null ? command.getChildren().size() : 0;
    4646        if (affectedRelations > 0) {
    4747            MainApplication.undoRedo.add(command);
     
    7575        }
    7676
    77         return new ReplaceGeometryCommand(tr("Replace Membership"), commands);
     77        return commands.isEmpty() ? null : new ReplaceGeometryCommand(tr("Replace Membership"), commands);
    7878    }
    7979
Note: See TracChangeset for help on using the changeset viewer.