Ticket #7701: 7701.patch

File 7701.patch, 1.7 KB (added by simon04, 14 years ago)
  • src/org/openstreetmap/josm/gui/mappaint/MapImage.java

    diff --git a/src/org/openstreetmap/josm/gui/mappaint/MapImage.java b/src/org/openstreetmap/josm/gui/mappaint/MapImage.java
    index d013e30..423c04a 100644
    a b public class MapImage {  
    6464                    public void finished(ImageIcon result) {
    6565                        synchronized (MapImage.this) {
    6666                            if (result == null) {
    67                                 img = (BufferedImage) MapPaintStyles.getNoIcon_Icon(source).getImage();
     67                                ImageIcon noIcon = MapPaintStyles.getNoIcon_Icon(source);
     68                                img = noIcon == null ? null : (BufferedImage) noIcon.getImage();
    6869                            } else {
    6970                                img = (BufferedImage) result.getImage();
    7071                            }
  • src/org/openstreetmap/josm/tools/ImageProvider.java

    diff --git a/src/org/openstreetmap/josm/tools/ImageProvider.java b/src/org/openstreetmap/josm/tools/ImageProvider.java
    index 60bee7d..014813d 100644
    a b public class ImageProvider {  
    249249                throw new RuntimeException(tr("Fatal: failed to locate image ''{0}''. This is a serious configuration problem. JOSM will stop working.", name + ext));
    250250            } else {
    251251                if (!suppressWarnings) {
    252                     System.err.println(tr("Failed to locate image ''{0}''", name));
     252                    System.err.println(tr("Failed to locate image ''{0}'' from dirs {1}, subdir ''{2}'', zip ''{3}''", name, dirs, subdir, archive));
    253253                }
    254254                return null;
    255255            }