Changeset 10793 in josm


Ignore:
Timestamp:
2016-08-13T17:08:58+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13337 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java

    r9949 r10793  
    1010import java.util.ArrayList;
    1111import java.util.Arrays;
     12import java.util.Collections;
    1213import java.util.List;
    1314
     
    7576        List<Action> actions;
    7677        if (selectedLayers.size() == 1) {
    77             actions = Arrays.asList(selectedLayers.get(0).getMenuEntries());
     78            Action[] entries = selectedLayers.get(0).getMenuEntries();
     79            actions = entries != null ? Arrays.asList(entries) : Collections.emptyList();
    7880        } else {
    7981            // Very simple algorithm - first selected layer has actions order as in getMenuEntries, actions from other layers go to the end
Note: See TracChangeset for help on using the changeset viewer.