Changeset 31072 in osm


Ignore:
Timestamp:
2015-04-01T00:05:30+02:00 (10 years ago)
Author:
donvip
Message:

[josm_utilsplugin2] fix #josm11281 - NPE

File:
1 edited

Legend:

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

    r30737 r31072  
    117117        // FIXME: handle different layers
    118118        List<Command> commands = new ArrayList<>();
    119         commands.add(MergeNodesAction.mergeNodes(Main.main.getEditLayer(), Arrays.asList(subjectNode, referenceNode), referenceNode));
     119        Command c = MergeNodesAction.mergeNodes(Main.main.getEditLayer(), Arrays.asList(subjectNode, referenceNode), referenceNode);
     120        if (c == null) {
     121            // User canceled
     122            return null;
     123        }
     124        commands.add(c);
    120125
    121126        return new ReplaceGeometryCommand(
Note: See TracChangeset for help on using the changeset viewer.