Changeset 12876 in josm


Ignore:
Timestamp:
2017-09-19T15:04:04+02:00 (10 months ago)
Author:
bastiK
Message:

fixed #15315 - NPE in eastNorth

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

Legend:

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

    r12846 r12876  
    667667        return false;
    668668    }
     669   
     670    /**
     671     * Replies true if all nodes of the way are drawable, false otherwise.
     672     * @return true if all nodes of the way are drawable, false otherwise.
     673     * @since 12876
     674     */
     675    public boolean hasOnlyDrawableNodes() {
     676        Node[] nodes = this.nodes;
     677        for (Node node : nodes) {
     678            if (!node.isDrawable())
     679                return false;
     680        }
     681        return true;
     682    }
    669683
    670684    @Override
     
    675689    @Override
    676690    public boolean isDrawable() {
    677         return super.isDrawable() && !hasIncompleteNodes();
     691        return super.isDrawable() && hasOnlyDrawableNodes();
    678692    }
    679693
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r12846 r12876  
    16621662        try {
    16631663            record.paintPrimitive(paintSettings, this);
    1664         } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
     1664        } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException | NullPointerException e) {
    16651665            throw BugReport.intercept(e).put("record", record);
    16661666        }
Note: See TracChangeset for help on using the changeset viewer.