Changeset 13301 in josm


Ignore:
Timestamp:
2018-01-08T20:06:39+01:00 (10 days ago)
Author:
Don-vip
Message:

see #15747 - add debug info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java

    r13173 r13301  
    2020import org.openstreetmap.josm.tools.HiDPISupport;
    2121import org.openstreetmap.josm.tools.Utils;
     22import org.openstreetmap.josm.tools.bugreport.BugReport;
    2223
    2324/**
     
    8687            // cast to BufferedImage and get pixel value at the center of the image
    8788            img = HiDPISupport.getBaseImage(img);
    88             color = new Color(((BufferedImage) img).getRGB(
    89                     fillImage.getWidth() / 2, fillImage.getHeight() / 2)
    90             );
     89            try {
     90                color = new Color(((BufferedImage) img).getRGB(
     91                        fillImage.getWidth() / 2, fillImage.getHeight() / 2)
     92                );
     93            } catch (ArrayIndexOutOfBoundsException e) {
     94                throw BugReport.intercept(e).put("env.osm", env.osm).put("iconRef", iconRef).put("fillImage", fillImage).put("img", img);
     95            }
    9196
    9297            fillImage.alpha = Utils.clamp(Config.getPref().getInt("mappaint.fill-image-alpha", 255), 0, 255);
Note: See TracChangeset for help on using the changeset viewer.