Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 13727)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 13741)
@@ -62,7 +62,13 @@
         int width = Math.abs(maxPt.x-minPt.x);
         int height = Math.abs(minPt.y-maxPt.y);
-        int diffx = reImgHash.width - width;
-        int diffy = reImgHash.height - height;
-
+        int diffx, diffy;
+        try {
+            diffx = reImgHash.width - width;
+            diffy = reImgHash.height - height;
+        } catch(Exception e) {
+            reImgHash = new Dimension(0, 0);
+            diffx = 99;
+            diffy = 99;
+        }
         // This happens if you zoom outside the world
         if(width == 0 || height == 0)
