Index: /applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java
===================================================================
--- /applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java	(revision 18589)
+++ /applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java	(revision 18590)
@@ -732,11 +732,14 @@
             return this.tilesSpanned() > 10;
         }
+        boolean insane() {
+            return this.tilesSpanned() > 100;
+        }
         double tilesSpanned() {
             return Math.sqrt(1.0 * this.size());
         }
 
-        int size() {
-            int x_span = z12x1 - z12x0 + 1;
-            int y_span = z12y1 - z12y0 + 1;
+        double size() {
+            double x_span = z12x1 - z12x0 + 1.0;
+            double y_span = z12y1 - z12y0 + 1.0;
             return x_span * y_span;
         }
@@ -753,4 +756,8 @@
         {
             List<Tile> ret = new ArrayList<Tile>();
+            // Don't even try to iterate over the set.
+            // Someone created a crazy number of them
+            if (this.insane())
+                return ret;
             for (int x = z12x0; x <= z12x1; x++) {
                 for (int y = z12y0; y <= z12y1; y++) {
@@ -852,4 +859,5 @@
         // Too many tiles... refuse to draw
         if (!ts.tooLarge()) {
+            //out("size: " + ts.size() + " spanned: " + ts.tilesSpanned());
             ts.loadAllTiles(false);
         }
@@ -875,4 +883,6 @@
                 LatLon botRight2 = tileLatLon(t2);
                 TileSet ts2 = new TileSet(topLeft2, botRight2, newzoom);
+                if (ts2.tooLarge())
+                    continue;
                 newlyMissedTiles.addAll(this.paintTileImages(g, ts2, newzoom, missed));
             }
@@ -911,5 +921,7 @@
         //g.drawString("currentZoomLevel=" + currentZoomLevel, 120, 120);
         oldg.setColor(Color.black);
-        if (ts.tooLarge()) {
+        if (ts.insane()) {
+            oldg.drawString("zoom in to load any tiles", 120, 120);
+        } else if (ts.tooLarge()) {
             oldg.drawString("zoom in to load more tiles", 120, 120);
         } else if (ts.tooSmall()) {
