Changeset 6016 in josm for trunk/src/org


Ignore:
Timestamp:
2013-06-21T09:43:29+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8812 - NPE in add wms panel

File:
1 edited

Legend:

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

    r6000 r6016  
    1212import java.io.IOException;
    1313import java.net.MalformedURLException;
     14import java.net.URL;
     15
    1416import javax.swing.DefaultComboBoxModel;
    15 
    1617import javax.swing.JButton;
    1718import javax.swing.JCheckBox;
     
    9798                wmsUrl.setEnabled(!endpoint.isSelected());
    9899                if (endpoint.isSelected()) {
    99                     name.setText(wms.getServiceUrl().getHost());
     100                    URL url = wms.getServiceUrl();
     101                    if (url != null) {
     102                        name.setText(url.getHost());
     103                    }
    100104                } else {
    101105                    onLayerSelectionChanged();
Note: See TracChangeset for help on using the changeset viewer.