Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java	(revision 19460)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java	(revision 19461)
@@ -38,5 +38,5 @@
      * ImageIcon can change while the image is loading.
      */
-    private Image img;
+    private volatile Image img;
     private ImageResource imageResource;
 
@@ -80,5 +80,5 @@
      * A cache that holds a disabled (gray) version of this image
      */
-    private BufferedImage disabledImgCache;
+    private volatile BufferedImage disabledImgCache;
 
     /**
@@ -142,12 +142,14 @@
         // This should fix #21919: NPE due to disabledImgCache being null (race condition with #loadImage())
         synchronized (this) {
-            Image disImg = GuiHelper.getDisabledImage(img);
-            if (disImg instanceof BufferedImage) {
-                disabledImgCache = (BufferedImage) disImg;
-            } else {
-                disabledImgCache = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
-                Graphics g = disabledImgCache.getGraphics();
-                g.drawImage(disImg, 0, 0, null);
-                g.dispose();
+            if(disabledImgCache != null) {
+                Image disImg = GuiHelper.getDisabledImage(img);
+                if (disImg instanceof BufferedImage) {
+                    disabledImgCache = (BufferedImage) disImg;
+                } else {
+                    disabledImgCache = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
+                    Graphics g = disabledImgCache.getGraphics();
+                    g.drawImage(disImg, 0, 0, null);
+                    g.dispose();
+                }
             }
         }
