Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java	(revision 18962)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java	(revision 19066)
@@ -38,7 +38,8 @@
 import org.openstreetmap.josm.gui.IconToggleButton;
 import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
 import org.openstreetmap.josm.plugins.Plugin;
@@ -139,5 +140,5 @@
         menu = new RoutingMenu();
         // Register this class as LayerChangeListener
-        Layer.listeners.add(this);
+        MapView.addLayerChangeListener(this);
         logger.debug("Finished loading plugin");
     }
