Changeset 8595 in josm for trunk/src/org


Ignore:
Timestamp:
2015-07-10T22:36:42+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #11681 - NPE in tagging presets initialization

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

Legend:

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

    r8594 r8595  
    791791                "waterway=stream | waterway=river | waterway=canal | waterway=drain | waterway=rapids | "+
    792792                "\"piste:type\"=downhill | \"piste:type\"=sled | man_made=\"piste:halfpipe\" | "+
    793                 "junction=roundabout | (highway=motorway & -oneway=no & -oneway=reversible) | (highway=motorway_link & -oneway=no & -oneway=reversible)";
     793                "junction=roundabout | (highway=motorway & -oneway=no & -oneway=reversible) | "+
     794                "(highway=motorway_link & -oneway=no & -oneway=reversible)";
    794795
    795796        try {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java

    r8510 r8595  
    5555            for (final TaggingPreset p : taggingPresets) {
    5656                JMenu m = p.group != null ? submenus.get(p.group) : Main.main.menu.presetsMenu;
    57                 if (p instanceof TaggingPresetSeparator) {
     57                if (m == null && p.group != null) {
     58                    Main.error("No tagging preset submenu for " + p.group);
     59                } else if (m == null) {
     60                    Main.error("No tagging preset menu. Tagging preset " + p + " won't be available there");
     61                } else if (p instanceof TaggingPresetSeparator) {
    5862                    m.add(new JSeparator());
    5963                } else if (p instanceof TaggingPresetMenu) {
Note: See TracChangeset for help on using the changeset viewer.