Changeset 4800 in josm


Ignore:
Timestamp:
2012-01-15T23:44:04+01:00 (12 years ago)
Author:
Don-vip
Message:

Fix NPE with custom importers returning null dataSets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmImporter.java

    r4755 r4800  
    1111
    1212import javax.swing.JOptionPane;
    13 import javax.swing.SwingUtilities;
    1413
    1514import org.openstreetmap.josm.Main;
     
    6867    public void loadLayer(InputStream in, final File associatedFile, final String layerName, ProgressMonitor progressMonitor) throws IllegalDataException {
    6968        final DataSet dataSet = parseDataSet(in, progressMonitor);
     69        if (dataSet == null) {
     70            throw new IllegalDataException(tr("Invalid dataset"));
     71        }
    7072        layer = createLayer(dataSet, associatedFile, layerName);
    7173        postLayerTask = createPostLayerTask(dataSet, associatedFile, layerName);
Note: See TracChangeset for help on using the changeset viewer.