Changeset 2679 in josm for trunk


Ignore:
Timestamp:
2009-12-24T15:38:14+01:00 (15 years ago)
Author:
jttt
Message:

Fixed #4230 NPE when searching for name$:[a-z] in Iceland.osm

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

    r2678 r2679  
    8585        if (osm.mappaintStyle == null && osm instanceof Node) {
    8686            osm.mappaintStyle = SimpleNodeElemStyle.INSTANCE;
     87        }
     88
     89        if (osm.mappaintStyle == null && osm instanceof Way) {
     90            osm.mappaintStyle = LineElemStyle.UNTAGGED_WAY;
    8791        }
    8892
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r2675 r2679  
    2727    }
    2828
    29     public String getCode()
    30     {
    31         if(code == null && rules != null)
    32         {
     29    public String getCode() {
     30        if(code == null) {
    3331            code = "";
    34             for(Rule r: rules) {
    35                 code += r.toCode();
     32            if (rules != null) {
     33                for(Rule r: rules) {
     34                    code += r.toCode();
     35                }
    3636            }
    3737        }
Note: See TracChangeset for help on using the changeset viewer.