Index: /applications/editors/josm/plugins/FastDraw/build.xml
===================================================================
--- /applications/editors/josm/plugins/FastDraw/build.xml	(revision 26459)
+++ /applications/editors/josm/plugins/FastDraw/build.xml	(revision 26460)
@@ -30,5 +30,5 @@
 <project name="FastDraw" default="dist" basedir=".">
     <!-- enter the SVN commit message -->
-    <property name="commit.message" value="FastDraw: fix NPE in last segment drawing"/>
+    <property name="commit.message" value="FastDraw: fix NPE and relation bugs after editing"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="4201"/>
@@ -248,5 +248,5 @@
     <target name="runjosm" depends="install">
         <java jar="${josm}" fork="true">
-            <arg line="../../core/data_nodist/restriction.osm"/>
+            <arg line="../../core/data_nodist/multipolygon.osm"/>
         </java>
     </target>
Index: /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java
===================================================================
--- /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26459)
+++ /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26460)
@@ -554,5 +554,5 @@
                     List<OsmPrimitive> refs = nd.getReferrers();
                     // does someone need this node? if no-delete it.
-                    if (refs.isEmpty()) cmds.add(new DeleteCommand(nd));                                       
+                    if (refs.isEmpty() && !nd.isDeleted() && nd.isUsable()) cmds.add(new DeleteCommand(nd));                                       
                 }
             }
@@ -663,5 +663,8 @@
         if (w.isClosed()) line.closeLine();
         oldNodes = w.getNodes();
-        cmds.add(new DeleteCommand(w));
+        List <OsmPrimitive> wl = new ArrayList(); wl.add(w);
+        
+        Command c = DeleteCommand.delete(getEditLayer(), wl, false);
+        if (c != null) cmds.add(c);
         delCmd = new SequenceCommand(tr("Convert way to FastDraw line"), cmds);
         Main.main.undoRedo.add(delCmd);
