Ticket #3341: null-bounds.patch

File null-bounds.patch, 1.3 KB (added by plaicy, 4 years ago)
  • src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

     
    112112            } 
    113113            if (dataSet == null) 
    114114                return; // user canceled download or error occurred 
     115            if (currentBounds == null) { 
     116                return; // no data retrieved 
     117            } 
    115118            if (dataSet.allPrimitives().isEmpty()) { 
    116119                progressMonitor.setErrorMessage(tr("No data imported.")); 
    117120                // need to synthesize a download bounds lest the visual indication of downloaded 
  • src/org/openstreetmap/josm/data/osm/DataSource.java

     
    1010    public DataSource(Bounds bounds, String origin) { 
    1111        this.bounds = bounds; 
    1212        this.origin = origin; 
     13        if (bounds == null) { 
     14            throw new NullPointerException(); 
     15        } 
    1316    } 
    1417 
    1518    @Override protected Object clone() throws CloneNotSupportedException {