Changeset 2537 in josm for trunk/src


Ignore:
Timestamp:
2009-11-28T18:09:44+01:00 (15 years ago)
Author:
Gubaer
Message:

fixed #2983: Error involving presets key-element without value, or other incorrect key syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r2512 r2537  
    658658                    // we subtract 100 if not found and add 1 if found
    659659                    found -= 100;
    660                     if(!valueCount.containsKey(key)) {
     660                    if(key == null || !valueCount.containsKey(key)) {
    661661                        continue;
    662662                    }
    663663
    664664                    Map<String, Integer> v = valueCount.get(key);
    665                     if(v.size() == 1 && v.containsKey(val) && v.get(val) == total) {
     665                    if(v.size() == 1 && val != null && v.containsKey(val) && v.get(val) == total) {
    666666                        found += 101;
    667667                    }
Note: See TracChangeset for help on using the changeset viewer.