Changeset 2960 in josm


Ignore:
Timestamp:
Feb 10, 2010 2:25:48 PM (3 years ago)
Author:
bastiK
Message:

fixed #4501 - NPE in AutoCompletion init when launching from dev tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionCache.java

    r2946 r2960  
    147147                if (item instanceof TaggingPreset.Check) { 
    148148                    TaggingPreset.Check ch = (TaggingPreset.Check) item; 
     149                    if (ch.key == null) continue; 
    149150                    presetTagCache.put(ch.key, OsmUtils.falseval); 
    150151                    presetTagCache.put(ch.key, OsmUtils.trueval); 
    151152                } else if (item instanceof TaggingPreset.Combo) { 
    152153                    TaggingPreset.Combo co = (TaggingPreset.Combo) item; 
     154                    if (co.key == null || co.values == null) continue; 
    153155                    for (String value : co.values.split(",")) { 
    154156                        presetTagCache.put(co.key, value); 
     
    156158                } else if (item instanceof TaggingPreset.Key) { 
    157159                    TaggingPreset.Key ky = (TaggingPreset.Key) item; 
     160                    if (ky.key == null || ky.value == null) continue; 
    158161                    presetTagCache.put(ky.key, ky.value); 
    159162                } else if (item instanceof TaggingPreset.Text) { 
    160163                    TaggingPreset.Text tt = (TaggingPreset.Text) item; 
     164                    if (tt.key == null) continue; 
    161165                    presetTagCache.putVoid(tt.key); 
    162166                    if (tt.default_ != null && !tt.default_.equals("")) { 
Note: See TracChangeset for help on using the changeset viewer.