Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 29435)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 29525)
@@ -556,5 +556,5 @@
                     System.out.println("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened.");
                     // remove the duplicated layer
-                    Main.map.mapView.removeLayer(wmsLayer);
+                    Main.main.removeLayer(wmsLayer);
                     throw new DuplicateLayerException();
                 }
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 29435)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 29525)
@@ -66,5 +66,5 @@
         actionCompleted();
         if (wmsLayer != null) {
-            Main.map.mapView.removeLayer(wmsLayer);
+            Main.main.removeLayer(wmsLayer);
             wmsLayer = null;
         }
@@ -278,5 +278,5 @@
         if (selectedValue == 0) { // "Cancel"
             // remove layer
-            Main.map.mapView.removeLayer(wmsLayer);
+            Main.main.removeLayer(wmsLayer);
             wmsLayer = null;
             Main.map.mapView.removeMouseListener(this);
