Changeset 5654 in josm


Ignore:
Timestamp:
2013-01-01T19:18:21+01:00 (12 years ago)
Author:
Don-vip
Message:

fix #8313 - NPE in download OSM task

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r5648 r5654  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.awt.geom.Area;
    67import java.io.IOException;
    78import java.util.ArrayList;
     
    266267                    targetLayer = getFirstDataLayer();
    267268                }
    268                 isUpdateData = targetLayer.data.getDataSourceArea().contains(currentBounds.asRect());
     269                Area dataSourceArea = targetLayer.data.getDataSourceArea();
     270                if (dataSourceArea != null) {
     271                    isUpdateData = dataSourceArea.contains(currentBounds.asRect());
     272                }
    269273                targetLayer.mergeFrom(dataSet);
    270274                computeBboxAndCenterScale();
Note: See TracChangeset for help on using the changeset viewer.