Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 5900)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 5901)
@@ -394,6 +394,6 @@
     @Override
     public void paint(Graphics2D g, MapView mv, Bounds bounds) {
-        int width = Main.map.mapView.getWidth();
-        int height = Main.map.mapView.getHeight();
+        int width = mv.getWidth();
+        int height = mv.getHeight();
         Rectangle clip = g.getClipBounds();
         if (useThumbs) {
