Changeset 14009 in josm


Ignore:
Timestamp:
2018-07-07T01:26:53+02:00 (4 months ago)
Author:
Don-vip
Message:

NPE

File:
1 edited

Legend:

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

    r13984 r14009  
    2626import javax.swing.DefaultListSelectionModel;
    2727import javax.swing.DropMode;
     28import javax.swing.Icon;
    2829import javax.swing.ImageIcon;
    2930import javax.swing.JCheckBox;
     
    836837            fireTableDataChanged();
    837838            int idx = getLayers().indexOf(layer);
    838             if (layerList != null) {
    839                 layerList.setRowHeight(idx, Math.max(16, layer.getIcon().getIconHeight()));
     839            Icon icon = layer.getIcon();
     840            if (layerList != null && icon != null) {
     841                layerList.setRowHeight(idx, Math.max(16, icon.getIconHeight()));
    840842            }
    841843            selectionModel.setSelectionInterval(idx, idx);
Note: See TracChangeset for help on using the changeset viewer.