Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java	(revision 13300)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java	(revision 13301)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.tools.HiDPISupport;
 import org.openstreetmap.josm.tools.Utils;
+import org.openstreetmap.josm.tools.bugreport.BugReport;
 
 /**
@@ -86,7 +87,11 @@
             // cast to BufferedImage and get pixel value at the center of the image
             img = HiDPISupport.getBaseImage(img);
-            color = new Color(((BufferedImage) img).getRGB(
-                    fillImage.getWidth() / 2, fillImage.getHeight() / 2)
-            );
+            try {
+                color = new Color(((BufferedImage) img).getRGB(
+                        fillImage.getWidth() / 2, fillImage.getHeight() / 2)
+                );
+            } catch (ArrayIndexOutOfBoundsException e) {
+                throw BugReport.intercept(e).put("env.osm", env.osm).put("iconRef", iconRef).put("fillImage", fillImage).put("img", img);
+            }
 
             fillImage.alpha = Utils.clamp(Config.getPref().getInt("mappaint.fill-image-alpha", 255), 0, 255);
