diff --git a/src/org/openstreetmap/josm/plugins/continuosDownload/DownloadStrategy.java b/src/org/openstreetmap/josm/plugins/continuosDownload/DownloadStrategy.java index a02f983..a2459a5 100644 --- a/src/org/openstreetmap/josm/plugins/continuosDownload/DownloadStrategy.java +++ b/src/org/openstreetmap/josm/plugins/continuosDownload/DownloadStrategy.java @@ -26,7 +26,10 @@ public void fetch(Bounds bbox) { public void fetch(Bounds bbox, Class klass) { Bounds extendedBox = extend(bbox, Main.pref.getDouble("plugin.continuos_download.extra_download", 0.1)); - Collection toFetch = getBoxes(extendedBox, getExisting(klass), + Collection existing = getExisting(klass); + if (existing.size() == 0) + return; + Collection toFetch = getBoxes(extendedBox, existing, Main.pref.getInteger("plugin.continuos_download.max_areas", 4)); printDebug(extendedBox, toFetch);