Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbDownloadLoop.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbDownloadLoop.java	(revision 18146)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbDownloadLoop.java	(revision 18147)
@@ -78,5 +78,6 @@
 
                 // auto download if configured
-                if( Main.pref.getBoolean(ConfigKeys.OSB_AUTO_DOWNLOAD) && OsbPlugin.active ) {
+                if( Main.pref.getBoolean(ConfigKeys.OSB_AUTO_DOWNLOAD) && 
+                        plugin != null && plugin.getDialog() != null && plugin.getDialog().isDialogShowing() ) {
                     if(countdown < 0) {
                         if(!downloadDone) {
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java	(revision 18146)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java	(revision 18147)
@@ -31,5 +31,4 @@
 
 import java.net.URL;
-import java.util.LinkedList;
 
 import javax.swing.ImageIcon;
@@ -65,6 +64,4 @@
     private OsbLayer layer;
 
-    public static boolean active = false;
-
     private DownloadAction download = new DownloadAction();
 
@@ -164,5 +161,5 @@
 
             // display the parsed data
-            if(!dataSet.nodes.isEmpty()) {
+            if(!dataSet.nodes.isEmpty() && dialog.isDialogShowing()) {
                 // if the map layer has been closed, while we are requesting the osb db,
                 // we don't have to update the gui, because the user is not interested
@@ -218,6 +215,4 @@
     public void layerAdded(Layer newLayer) {
         if(newLayer instanceof OsmDataLayer) {
-            active = dialog.isDialogShowing();
-
             // start the auto download loop
             OsbDownloadLoop.getInstance().setPlugin(this);
@@ -246,3 +241,7 @@
         this.dataSet = dataSet;
     }
+    
+    public OsbDialog getDialog() {
+        return dialog;
+    }
 }
