Index: applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java
===================================================================
--- applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java	(revision 32015)
+++ applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java	(revision 32329)
@@ -133,5 +133,5 @@
         // GeoImageLayer.  GeoImageLayer's are handled by the plug-in
         // directly.
-        if (! (Main.map.mapView.getActiveLayer() instanceof GeoImageLayer)) {
+        if (! (Main.getLayerManager().getActiveLayer() instanceof GeoImageLayer)) {
             activateMode();
         }
@@ -208,5 +208,5 @@
     private boolean hasLayersToAdjust() {
         if (Main.map == null || Main.map.mapView == null) return false;
-        return ! Main.map.mapView.getLayersOfType(GeoImageLayer.class).isEmpty();
+        return ! Main.getLayerManager().getLayersOfType(GeoImageLayer.class).isEmpty();
     }
 
@@ -217,5 +217,5 @@
      */
     private List<GeoImageLayer> getVisibleGeoImageLayers() {
-        List<GeoImageLayer> all = new ArrayList<>(Main.map.mapView.getLayersOfType(GeoImageLayer.class));
+        List<GeoImageLayer> all = new ArrayList<>(Main.getLayerManager().getLayersOfType(GeoImageLayer.class));
         Iterator<GeoImageLayer> it = all.iterator();
         while (it.hasNext()) {
