Changeset 6626 in josm for trunk/src/org


Ignore:
Timestamp:
2014-01-04T16:36:20+01:00 (11 years ago)
Author:
Don-vip
Message:

fix #9530 - NPE in color preferences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r6624 r6626  
    878878            colStr = get("color." + colKey, ColorHelper.color2html(def));
    879879        }
    880         return colStr.isEmpty() ? def : ColorHelper.html2color(colStr);
     880        if (colStr != null && !colStr.isEmpty()) {
     881            return ColorHelper.html2color(colStr);
     882        } else {
     883            return def;
     884        }
    881885    }
    882886
Note: See TracChangeset for help on using the changeset viewer.