Ignore:
Timestamp:
2016-02-04T01:17:15+01:00 (3 years ago)
Author:
Don-vip
Message:

fix NPE seen in unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r9677 r9733  
    743743        OsmDataLayer l = (OsmDataLayer) newLayer;
    744744        l.data.addDataSetListener(this);
    745         OsmPrimitive primitive = l.data.getPrimitiveById(history.getId(), history.getType());
     745        OsmPrimitive primitive = history != null ? l.data.getPrimitiveById(history.getId(), history.getType()) : null;
    746746        HistoryOsmPrimitive latest;
    747747        if (canShowAsLatest(primitive)) {
Note: See TracChangeset for help on using the changeset viewer.