Changeset 13066 in josm


Ignore:
Timestamp:
2017-11-01T14:35:33+01:00 (3 weeks ago)
Author:
Don-vip
Message:

see #12347 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java

    r13065 r13066  
    443443
    444444    static OsmPrimitive findVia(Relation r, String type) {
    445         switch (type) {
    446         case "restriction":
    447             return findRelationMember(r, "via").orElse(null);
    448         case "destination_sign":
    449             // Prefer intersection over sign, see #12347
    450             return findRelationMember(r, "intersection").orElse(findRelationMember(r, "sign").orElse(null));
    451         default:
    452             return null;
    453         }
     445        if (type != null) {
     446            switch (type) {
     447            case "restriction":
     448                return findRelationMember(r, "via").orElse(null);
     449            case "destination_sign":
     450                // Prefer intersection over sign, see #12347
     451                return findRelationMember(r, "intersection").orElse(findRelationMember(r, "sign").orElse(null));
     452            default:
     453                return null;
     454            }
     455        }
     456        return null;
    454457    }
    455458
Note: See TracChangeset for help on using the changeset viewer.