Index: /trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 2332)
+++ /trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 2333)
@@ -197,5 +197,7 @@
             }
         }
-        cmds.add(new DeleteCommand(waysToDelete));
+        if (!waysToDelete.isEmpty()) {
+            cmds.add(new DeleteCommand(waysToDelete));
+        }
         return cmds;
     }
Index: /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 2332)
+++ /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 2333)
@@ -51,10 +51,12 @@
      * Constructor. Deletes a collection of primitives in the current edit layer.
      * 
-     * @param data the primitives to delete
-     */
-    public DeleteCommand(Collection<? extends OsmPrimitive> data) {
-        if (data == null) {
-            data = Collections.emptyList();
-        }
+     * @param data the primitives to delete. Must neither be null nor empty.
+     * @throws IllegalArgumentException thrown if data is null or empty
+     */
+    public DeleteCommand(Collection<? extends OsmPrimitive> data) throws IllegalArgumentException {
+        if (data == null) 
+            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty"));
+        if (data.isEmpty())
+            throw new IllegalArgumentException(tr("At least one object to delete requird, got empty collection"));            
         this.toDelete = data;
     }
@@ -93,12 +95,14 @@
      *
      * @param layer the layer context for deleting these primitives. Must not be null.
-     * @param data the primitives to delete
+     * @param data the primitives to delete. Must neither be null nor empty.
      * @throws IllegalArgumentException thrown if layer is null
+     * @throws IllegalArgumentException thrown if data is null or empty
      */
     public DeleteCommand(OsmDataLayer layer, Collection<? extends OsmPrimitive> data) throws IllegalArgumentException{
         super(layer);
-        if (data == null) {
-            data = Collections.emptyList();
-        }
+        if (data == null) 
+            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty"));
+        if (data.isEmpty())
+            throw new IllegalArgumentException(tr("At least one object to delete requird, got empty collection"));            
         this.toDelete = data;
     }
