Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 15894)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 15895)
@@ -1534,4 +1534,8 @@
      */
     public static ImageIcon getPadded(OsmPrimitive primitive, Dimension iconSize, Collection<GetPaddedOptions> options) {
+        if (iconSize.width <= 0 || iconSize.height <= 0) {
+            return null;
+        }
+
         // Check if the current styles have special icon for tagged objects.
         if (primitive.isTagged()) {
