Index: /applications/editors/josm/plugins/reverter/build.xml
===================================================================
--- /applications/editors/josm/plugins/reverter/build.xml	(revision 35081)
+++ /applications/editors/josm/plugins/reverter/build.xml	(revision 35082)
@@ -2,5 +2,5 @@
 <project name="reverter" default="dist" basedir=".">
     <!-- enter the SVN commit message -->
-    <property name="commit.message" value="Reverter: fix #josm16508 use mulit-fetch API for objects history"/>
+    <property name="commit.message" value="Reverter: fix possible NPE"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="14946"/>
Index: /applications/editors/josm/plugins/reverter/src/reverter/MultiOsmReader.java
===================================================================
--- /applications/editors/josm/plugins/reverter/src/reverter/MultiOsmReader.java	(revision 35081)
+++ /applications/editors/josm/plugins/reverter/src/reverter/MultiOsmReader.java	(revision 35082)
@@ -44,6 +44,6 @@
     protected Node parseNode() throws XMLStreamException  {
         Node node = super.parseNode();
-        if (callback != null) {
-            callback.primitiveParsed(node.getPrimitiveId());
+        if (callback != null && node != null) {
+            callback.primitiveParsed(node);
         }
         return node;
@@ -52,6 +52,6 @@
     protected Way parseWay() throws XMLStreamException  {
         Way way = super.parseWay();
-        if (callback != null) {
-            callback.primitiveParsed(way.getPrimitiveId());
+        if (callback != null && way != null) {
+            callback.primitiveParsed(way);
         }
         return way;
@@ -60,6 +60,6 @@
     protected Relation parseRelation() throws XMLStreamException  {
         Relation relation = super.parseRelation();
-        if (callback != null) {
-            callback.primitiveParsed(relation.getPrimitiveId());
+        if (callback != null && relation != null) {
+            callback.primitiveParsed(relation);
         }
         return relation;
