Changeset 5774 in josm for trunk/src


Ignore:
Timestamp:
2013-03-13T21:25:32+01:00 (11 years ago)
Author:
Don-vip
Message:

fix #8490 - NPE

File:
1 edited

Legend:

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

    r5766 r5774  
    112112            }
    113113        }
    114         if (p != null) {
    115             osm.mappaintStyle = osm.mappaintStyle.put(p.a, p.b);
    116         }
     114        StyleCache style = osm.mappaintStyle != null ? osm.mappaintStyle : StyleCache.EMPTY_STYLECACHE;
     115        osm.mappaintStyle = style.put(p.a, p.b);
    117116        osm.mappaintCacheIdx = cacheIdx;
    118117        return p;
Note: See TracChangeset for help on using the changeset viewer.