Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/viewers/projections/Equirectangular.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/viewers/projections/Equirectangular.java	(revision 18603)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/viewers/projections/Equirectangular.java	(revision 18604)
@@ -13,4 +13,7 @@
 import java.util.Set;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
 import org.openstreetmap.josm.data.imagery.street_level.Projections;
 import org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay;
@@ -25,4 +28,5 @@
  */
 public class Equirectangular extends ComponentAdapter implements IImageViewer {
+    @Nullable
     private volatile CameraPlane cameraPlane;
     private volatile BufferedImage offscreenImage;
@@ -38,5 +42,6 @@
         final BufferedImage currentOffscreenImage;
         synchronized (this) {
-            currentCameraPlane = this.cameraPlane;
+            final CameraPlane currentPlane = this.cameraPlane;
+            currentCameraPlane = currentPlane != null ? currentPlane : this.updateCameraPlane(target.width, target.height);
             currentOffscreenImage = this.offscreenImage;
         }
@@ -57,5 +62,9 @@
     @Override
     public Vector3D getRotation() {
-        return this.cameraPlane.getRotation();
+        final CameraPlane currentPlane = this.cameraPlane;
+        if (currentPlane != null) {
+            return currentPlane.getRotation();
+        }
+        return IImageViewer.super.getRotation();
     }
 
@@ -65,25 +74,5 @@
         if (e.getComponent().getWidth() > 0
                 && e.getComponent().getHeight() > 0) {
-            // FIXME: Do something so that the types of the images are the same between the offscreenImage and
-            // the image entry
-            final CameraPlane currentCameraPlane;
-            synchronized (this) {
-                currentCameraPlane = this.cameraPlane;
-            }
-            final BufferedImage temporaryOffscreenImage = new BufferedImage(imgDisplay.getWidth(), imgDisplay.getHeight(),
-                    BufferedImage.TYPE_4BYTE_ABGR);
-
-            Vector3D currentRotation = null;
-            if (currentCameraPlane != null) {
-                currentRotation = currentCameraPlane.getRotation();
-            }
-            final CameraPlane temporaryCameraPlane = new CameraPlane(imgDisplay.getWidth(), imgDisplay.getHeight());
-            if (currentRotation != null) {
-                temporaryCameraPlane.setRotation(currentRotation);
-            }
-            synchronized (this) {
-                this.cameraPlane = temporaryCameraPlane;
-                this.offscreenImage = temporaryOffscreenImage;
-            }
+            updateCameraPlane(imgDisplay.getWidth(), imgDisplay.getHeight());
             if (imgDisplay instanceof ImageDisplay) {
                 ((ImageDisplay) imgDisplay).updateVisibleRectangle();
@@ -93,8 +82,40 @@
     }
 
+    /**
+     * Update the current camera plane
+     * @param width The width to use
+     * @param height The height to use
+     */
+    @Nonnull
+    private CameraPlane updateCameraPlane(int width, int height) {
+        // FIXME: Do something so that the types of the images are the same between the offscreenImage and
+        // the image entry
+        final CameraPlane currentCameraPlane;
+        synchronized (this) {
+            currentCameraPlane = this.cameraPlane;
+        }
+        final BufferedImage temporaryOffscreenImage = new BufferedImage(width, height,
+                BufferedImage.TYPE_4BYTE_ABGR);
+
+        Vector3D currentRotation = null;
+        if (currentCameraPlane != null) {
+            currentRotation = currentCameraPlane.getRotation();
+        }
+        final CameraPlane temporaryCameraPlane = new CameraPlane(width, height);
+        if (currentRotation != null) {
+            temporaryCameraPlane.setRotation(currentRotation);
+        }
+        synchronized (this) {
+            this.cameraPlane = temporaryCameraPlane;
+            this.offscreenImage = temporaryOffscreenImage;
+        }
+        return temporaryCameraPlane;
+    }
+
     @Override
     public void mouseDragged(final Point from, final Point to, ImageDisplay.VisRect currentVisibleRect) {
-        if (from != null && to != null) {
-            this.cameraPlane.setRotationFromDelta(from, to);
+        final CameraPlane currentPlane = this.cameraPlane;
+        if (from != null && to != null && currentPlane != null) {
+            currentPlane.setRotationFromDelta(from, to);
         }
     }
