Index: trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 6005)
+++ trunk/src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 6006)
@@ -2,11 +2,14 @@
 package org.openstreetmap.josm.actions;
 
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.Set;
 
 import javax.swing.JOptionPane;
@@ -28,4 +31,7 @@
 public final class DistributeAction extends JosmAction {
 
+    /**
+     * Constructs a new {@code DistributeAction}.
+     */
     public DistributeAction() {
         super(tr("Distribute Nodes"), "distribute", tr("Distribute the selected nodes to equal distances along a line."),
@@ -34,5 +40,5 @@
         putValue("help", ht("/Action/DistributeNodes"));
     }
-
+    
     /**
      * The general algorithm here is to find the two selected nodes
@@ -59,4 +65,11 @@
                     itnodes.addAll(((Way)osm).getNodes());
                 }
+        }
+        
+        Set<Node> ignoredNodes = removeNodesWithoutCoordinates(nodes);
+        ignoredNodes.addAll(removeNodesWithoutCoordinates(itnodes));
+        if (!ignoredNodes.isEmpty()) {
+            Main.warn(tr("Ignoring {0} nodes with null coordinates", ignoredNodes.size()));
+            ignoredNodes.clear();
         }
 
@@ -136,4 +149,16 @@
         Main.map.repaint();
     }
+    
+    private Set<Node> removeNodesWithoutCoordinates(Collection<Node> col) {
+        Set<Node> result = new HashSet<Node>();
+        for (Iterator<Node> it = col.iterator(); it.hasNext();) {
+            Node n = it.next();
+            if (n.getCoor() == null) {
+                it.remove();
+                result.add(n);
+            }
+        }
+        return result;
+    }
 
     @Override
