Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 27863)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 29525)
@@ -252,5 +252,5 @@
         } else if (oldLayer == Main.map.mapView.getEditLayer()) { //data layer removed
             if (graphViewLayer != null) {
-                Main.map.mapView.removeLayer(graphViewLayer);
+                Main.main.removeLayer(graphViewLayer);
                 graphViewLayer = null;
             }
