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 29854)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 30145)
@@ -250,5 +250,5 @@
         if (oldLayer == graphViewLayer) {
             graphViewLayer = null;
-        } else if (oldLayer == Main.map.mapView.getEditLayer()) { //data layer removed
+        } else if (oldLayer == Main.main.getEditLayer()) { //data layer removed
             if (graphViewLayer != null) {
                 Main.main.removeLayer(graphViewLayer);
