Changeset 13013 in josm


Ignore:
Timestamp:
2017-10-17T20:59:50+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15446 - robustness against negative dashes-offset

File:
1 edited

Legend:

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

    r12620 r13013  
    357357        }
    358358        float dashesOffset = c.get(type.prefix + DASHES_OFFSET, 0f, Float.class);
     359        if (dashesOffset < 0f) {
     360            Logging.warn("Found negative " + DASHES_OFFSET + ": " + dashesOffset);
     361            dashesOffset = 0f;
     362        }
    359363        Color dashesBackground = c.get(type.prefix + DASHES_BACKGROUND_COLOR, null, Color.class);
    360364        if (dashesBackground != null) {
Note: See TracChangeset for help on using the changeset viewer.