Changeset 35980 in osm for applications


Ignore:
Timestamp:
2022-06-16T14:48:53+02:00 (2 years ago)
Author:
taylor.smock
Message:

Fix #22144: NPE when no edit layer exists and remote control is called

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java

    r35976 r35980  
    142142        this.changesetId = changesetId;
    143143        OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
     144        newLayer = newLayer || editLayer == null;
    144145        if (newLayer) {
    145146            this.ds = new DataSet();
    146147            this.layer = new OsmDataLayer(this.ds, tr("Reverted changeset") + tr(" [id: {0}]", String.valueOf(changesetId)), null);
    147             this.ods = ods;
    148148        } else {
    149149            this.layer = editLayer;
    150150            this.ds = editLayer.data;
    151             this.ods = ods;
    152         }
     151        }
     152        this.ods = ods;
    153153        this.revertType = revertType;
    154154        if ((revertType == RevertType.SELECTION || revertType == RevertType.SELECTION_WITH_UNDELETE)
Note: See TracChangeset for help on using the changeset viewer.