Changeset 33991 in osm


Ignore:
Timestamp:
2018-01-10T21:16:50+01:00 (7 years ago)
Author:
donvip
Message:

fix #josm15756 - do not open empty page if nothing is selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/OpenPageAction.java

    r33702 r33991  
    6666                key = m.group(1); val = null;
    6767                if (key.equals("#id")) {
    68                     if (p != null) val = Long.toString(p.getId());
     68                    if (p != null) {
     69                        val = Long.toString(p.getId());
     70                    } else {
     71                        // id without anything selected does not make any sense, do nothing
     72                        return;
     73                    }
    6974                } else if (key.equals("#type")) {
    7075                    if (p != null) val = OsmPrimitiveType.from(p).getAPIName();
Note: See TracChangeset for help on using the changeset viewer.