Changeset 17039 in josm for trunk


Ignore:
Timestamp:
2020-09-19T11:25:42+02:00 (4 years ago)
Author:
GerdP
Message:

fix #19817: NPE when changing autofilter option while no layer is visible
Add null check (regression from r15838)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java

    r16436 r17039  
    224224
    225225    private void removeAllButtons() {
    226         buttons.values().forEach(MainApplication.getMap().mapView::remove);
     226        MapFrame map= MainApplication.getMap();
     227        if (map != null) {
     228            buttons.values().forEach(map.mapView::remove);
     229        }
    227230        buttons.clear();
    228231    }
Note: See TracChangeset for help on using the changeset viewer.