Changeset 14175 in josm for trunk


Ignore:
Timestamp:
2018-08-21T22:13:05+02:00 (6 years ago)
Author:
wiktorn
Message:

Fix NPE when providing only WMS URL in AddImageryPanel

Closes: #16671

File:
1 edited

Legend:

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

    r13828 r14175  
    182182            }
    183183        } else {
    184             info = wms.toImageryInfo(getImageryName(), tree.getSelectedLayers(), (List<String>) null, true); // TODO: ask user about transparency
    185             info.setUrl(getWmsUrl());
     184            if (wms != null && wms.buildRootUrl() != null) {
     185                info = wms.toImageryInfo(getImageryName(), tree.getSelectedLayers(), (List<String>) null, true); // TODO: ask user about transparency
     186            } else {
     187                info = new ImageryInfo(getImageryName(), getWmsUrl());
     188            }
    186189            info.setImageryType(ImageryType.WMS);
    187190        }
Note: See TracChangeset for help on using the changeset viewer.