Index: applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java
===================================================================
--- applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java	(revision 34369)
+++ applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java	(revision 34370)
@@ -42,5 +42,7 @@
         // Remove protocol
         int i = url.indexOf("://");
-        url = url.substring(i + 3);
+        if (i > 0) {
+            url = url.substring(i + 3);
+        }
 
         // Split URL into address and query string
