Changeset 1979 in josm for trunk/src


Ignore:
Timestamp:
2009-08-13T20:39:03+02:00 (15 years ago)
Author:
stoecker
Message:

closes #3267 - patch by plaicy - fix NPE

File:
1 edited

Legend:

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

    r1885 r1979  
    124124            }
    125125        }
    126         Set<Long> myPrimitiveIds = Main.map.mapView.getEditLayer().data.getCompletePrimitiveIds();
    127         Set<Long> downloadedIds = getDownloadedIds();
    128         myPrimitiveIds.removeAll(downloadedIds);
    129         myPrimitiveIds.remove(new Long(0)); // ignore new primitives
    130         if (! myPrimitiveIds.isEmpty()) {
    131             handlePotentiallyDeletedPrimitives(myPrimitiveIds);
     126        final OsmDataLayer editLayer = Main.map.mapView.getEditLayer();
     127        if (editLayer != null) {
     128            Set<Long> myPrimitiveIds = editLayer.data.getCompletePrimitiveIds();
     129            Set<Long> downloadedIds = getDownloadedIds();
     130            myPrimitiveIds.removeAll(downloadedIds);
     131            myPrimitiveIds.remove(new Long(0)); // ignore new primitives
     132            if (! myPrimitiveIds.isEmpty()) {
     133                handlePotentiallyDeletedPrimitives(myPrimitiveIds);
     134            }
    132135        }
    133136    }
Note: See TracChangeset for help on using the changeset viewer.