Ticket #17534: crash.patch

File crash.patch, 901 bytes (added by taylor.smock, 6 years ago)

Possible fix for crash

  • src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java

     
    4141        super.enterMode();
    4242        MainApplication.getMap().mapView.addMouseListener(this);
    4343        MainApplication.getMap().mapView.addMouseMotionListener(this);
    44         MainApplication.getLayerManager().addActiveLayerChangeListener(this);
     44        try {
     45                MainApplication.getLayerManager().addActiveLayerChangeListener(this);
     46        } catch (IllegalArgumentException e) {
     47                // This will (hopefully) only occur when this has already been added...
     48        }
    4549    }
    4650
    4751    @Override public void exitMode() {