From f78b8a363a5acd714cf7ecab20951ddb05dc1acd Mon Sep 17 00:00:00 2001 From: Vincent Privat Date: Wed, 25 Aug 2021 17:06:32 +0200 Subject: [PATCH] fix #20958 - NPE --- .../plugins/continuosDownload/AbstractDownloadStrategy.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/openstreetmap/josm/plugins/continuosDownload/AbstractDownloadStrategy.java b/src/org/openstreetmap/josm/plugins/continuosDownload/AbstractDownloadStrategy.java index 1cd4918..c5f386e 100644 --- a/src/org/openstreetmap/josm/plugins/continuosDownload/AbstractDownloadStrategy.java +++ b/src/org/openstreetmap/josm/plugins/continuosDownload/AbstractDownloadStrategy.java @@ -91,6 +91,8 @@ private static Bounds intersection(Bounds box1, Bounds box2) { private static Collection getExisting(Class klass) { if (klass.isAssignableFrom(OsmDataLayer.class)) { + if (!MainApplication.isDisplayingMapView()) + return null; OsmDataLayer layer = MainApplication.getMap().mapView.getLayerManager().getEditLayer(); if (layer == null) { Collection layers = MainApplication.getMap().mapView.getLayerManager().getLayers();