Ignore:
Timestamp:
2019-08-11T14:00:33+02:00 (5 years ago)
Author:
upliner
Message:

Reverter: fix possible NPE

Location:
applications/editors/josm/plugins/reverter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/build.xml

    r35080 r35082  
    22<project name="reverter" default="dist" basedir=".">
    33    <!-- enter the SVN commit message -->
    4     <property name="commit.message" value="Reverter: fix #josm16508 use mulit-fetch API for objects history"/>
     4    <property name="commit.message" value="Reverter: fix possible NPE"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    66    <property name="plugin.main.version" value="14946"/>
  • applications/editors/josm/plugins/reverter/src/reverter/MultiOsmReader.java

    r35078 r35082  
    4444    protected Node parseNode() throws XMLStreamException  {
    4545        Node node = super.parseNode();
    46         if (callback != null) {
    47             callback.primitiveParsed(node.getPrimitiveId());
     46        if (callback != null && node != null) {
     47            callback.primitiveParsed(node);
    4848        }
    4949        return node;
     
    5252    protected Way parseWay() throws XMLStreamException  {
    5353        Way way = super.parseWay();
    54         if (callback != null) {
    55             callback.primitiveParsed(way.getPrimitiveId());
     54        if (callback != null && way != null) {
     55            callback.primitiveParsed(way);
    5656        }
    5757        return way;
     
    6060    protected Relation parseRelation() throws XMLStreamException  {
    6161        Relation relation = super.parseRelation();
    62         if (callback != null) {
    63             callback.primitiveParsed(relation.getPrimitiveId());
     62        if (callback != null && relation != null) {
     63            callback.primitiveParsed(relation);
    6464        }
    6565        return relation;
Note: See TracChangeset for help on using the changeset viewer.