Index: trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java	(revision 9845)
+++ trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java	(revision 9846)
@@ -118,8 +118,10 @@
                     double factor = Math.log(step) / Math.log(ratio);
                     int steps = (int) Math.round(factor);
-                    double smallStep = Math.pow(step, 1.0/steps);
-                    for (int j = 1; j < steps; j++) {
-                        double intermediate = previous.scale / Math.pow(smallStep, j);
-                        result.addScale(new Scale(intermediate, false, current.index));
+                    if (steps != 0) {
+                        double smallStep = Math.pow(step, 1.0/steps);
+                        for (int j = 1; j < steps; j++) {
+                            double intermediate = previous.scale / Math.pow(smallStep, j);
+                            result.addScale(new Scale(intermediate, false, current.index));
+                        }
                     }
                 }
