Changeset 15747 in josm for trunk/src


Ignore:
Timestamp:
2020-01-22T18:40:09+01:00 (5 years ago)
Author:
simon04
Message:

see #18591 - fix CCE, fix NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java

    r15732 r15747  
    7676        if (isSuperRoute(r)) {
    7777            final WayConnectionType wct;
    78             if (!members.get(i).isRelation()) {
    79                 return new WayConnectionType(true);
    80             } else if (i == 0) {
    81                 return new WayConnectionType(false);
     78            if (i == 0) {
     79                wct = new WayConnectionType(false);
     80            } else if (!members.get(i).isRelation() || !members.get(i - 1).isRelation()) {
     81                wct = new WayConnectionType(true);
    8282            } else {
    8383                final List<RelationMember> previousMembers = members.get(i - 1).getRelation().getMembers();
Note: See TracChangeset for help on using the changeset viewer.