Index: applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java
===================================================================
--- applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 30761)
+++ applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 32329)
@@ -27,5 +27,5 @@
     // within given radius of line between given points
     GPSBlamInputData(Point p1, Point p2, int radius) {
-        Collection<Layer> layers = Main.map.mapView.getAllLayers();
+        Collection<Layer> layers = Main.getLayerManager().getLayers();
         for (Layer l : layers) {
             if (l.isVisible() && l instanceof GpxLayer) {
