Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 30738)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 32329)
@@ -363,5 +363,5 @@
             if (event.getButton() == MouseEvent.BUTTON1) {
                 if (event.getClickCount() == 2 && !event.isConsumed()) {
-                    if (Main.map.mapView.getActiveLayer() == getMapdustLayer()) {
+                    if (Main.getLayerManager().getActiveLayer() == getMapdustLayer()) {
                         /* show add bug dialog */
                         MapdustBug bug = mapdustGUI.getSelectedBug();
@@ -620,10 +620,5 @@
      */
     private boolean containsMapdustLayer() {
-        boolean contains = false;
-        List<Layer> all = Main.map.mapView.getAllLayersAsList();
-        if (mapdustLayer != null && all.contains(mapdustLayer)) {
-            contains = true;
-        }
-        return contains;
+        return mapdustLayer != null && Main.getLayerManager().containsLayer(mapdustLayer);
     }
 
