Changeset 4468 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2011-09-26T17:59:26+02:00 (13 years ago)
Author:
simon04
Message:

fix #6888 - WMS: avoid NullPointerException (patch by Don-vip)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java

    r4467 r4468  
    282282        StringBuilder b = new StringBuilder();
    283283
    284         Iterator<LayerDetails> iterator = selectedLayers.iterator();
    285         while (iterator.hasNext()) {
    286             LayerDetails layerDetails = iterator.next();
    287             b.append(layerDetails.ident);
    288             if(iterator.hasNext()) {
    289                 b.append(",");
     284        if (selectedLayers != null) {
     285            Iterator<LayerDetails> iterator = selectedLayers.iterator();
     286            while (iterator.hasNext()) {
     287                LayerDetails layerDetails = iterator.next();
     288                b.append(layerDetails.ident);
     289                if(iterator.hasNext()) {
     290                    b.append(",");
     291                }
    290292            }
    291293        }
Note: See TracChangeset for help on using the changeset viewer.