Index: applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java	(revision 29435)
+++ applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java	(revision 29531)
@@ -162,9 +162,9 @@
 
             // Position image at the right graphical place
-            EastNorth center = Main.map.mapView.getCenter();
-            EastNorth leftop = Main.map.mapView.getEastNorth(0, 0);
-            double pixel_per_east_unit = (Main.map.mapView.getWidth() / 2.0)
+            EastNorth center = mv.getCenter();
+            EastNorth leftop = mv.getEastNorth(0, 0);
+            double pixel_per_east_unit = (mv.getWidth() / 2.0)
                     / (center.east() - leftop.east());
-            double pixel_per_north_unit = (Main.map.mapView.getHeight() / 2.0)
+            double pixel_per_north_unit = (mv.getHeight() / 2.0)
                     / (leftop.north() - center.north());
 
@@ -182,6 +182,5 @@
 
             // Determine scale to fit JOSM extents
-            ProjectionBounds projbounds = Main.map.mapView
-                    .getProjectionBounds();
+            ProjectionBounds projbounds = mv.getProjectionBounds();
 
             double width = projbounds.maxEast - projbounds.minEast;
@@ -193,6 +192,6 @@
                     / height;
 
-            double pixels4bbox_width = ratio_x * Main.map.mapView.getWidth();
-            double pixels4bbox_height = ratio_y * Main.map.mapView.getHeight();
+            double pixels4bbox_width = ratio_x * mv.getWidth();
+            double pixels4bbox_height = ratio_y * mv.getHeight();
 
             // Scale image to JOSM extents
