Changeset 5947 in josm for trunk


Ignore:
Timestamp:
2013-05-09T03:29:40+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #8692 - Handle null DeleteCommands in JoinAreaAction and ImproveWayAccuracyAction

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r5903 r5947  
    507507        // Delete the discarded inner ways
    508508        if (discardedWays.size() > 0) {
    509             cmds.add(DeleteCommand.delete(Main.map.mapView.getEditLayer(), discardedWays, true));
    510             commitCommands(marktr("Delete Ways that are not part of an inner multipolygon"));
     509            Command deleteCmd = DeleteCommand.delete(Main.map.mapView.getEditLayer(), discardedWays, true);
     510            if (deleteCmd != null) {
     511                cmds.add(deleteCmd);
     512                commitCommands(marktr("Delete Ways that are not part of an inner multipolygon"));
     513            }
    511514        }
    512515
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java

    r5665 r5947  
    469469                    nodeList.add(candidateNode);
    470470                    Command deleteCmd = DeleteCommand.delete(getEditLayer(), nodeList, true);
    471                     Main.main.undoRedo.add(deleteCmd);
     471                    if (deleteCmd != null) {
     472                        Main.main.undoRedo.add(deleteCmd);
     473                    }
    472474                }
    473475
Note: See TracChangeset for help on using the changeset viewer.