Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 14505)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 14506)
@@ -35,4 +35,5 @@
 import java.util.Base64;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.EnumMap;
 import java.util.HashMap;
@@ -259,5 +260,5 @@
 
     /** set of class loaders to take images from */
-    private static final Set<ClassLoader> classLoaders = new HashSet<>();
+    private static final Set<ClassLoader> classLoaders = Collections.synchronizedSet(new HashSet<>());
     static {
         try {
@@ -1208,8 +1209,10 @@
         if (path != null && path.startsWith("resource://")) {
             String p = path.substring("resource://".length());
-            for (ClassLoader source : classLoaders) {
-                URL res;
-                if ((res = source.getResource(p + name)) != null)
-                    return res;
+            synchronized (classLoaders) {
+                for (ClassLoader source : classLoaders) {
+                    URL res;
+                    if ((res = source.getResource(p + name)) != null)
+                        return res;
+                }
             }
         } else {
