Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8063)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8064)
@@ -177,8 +177,8 @@
         // update selection to reflect which way being modified
         DataSet currentDataSet = getCurrentDataSet();
-        if (currentBaseNode != null && currentDataSet != null && !currentDataSet.getSelected().isEmpty()) {
-            Way continueFrom = getWayForNode(currentBaseNode);
-            if (alt && continueFrom != null && (!currentBaseNode.isSelected() || continueFrom.isSelected())) {
-                addRemoveSelection(currentDataSet, currentBaseNode, continueFrom);
+        if (getCurrentBaseNode() != null && currentDataSet != null && !currentDataSet.getSelected().isEmpty()) {
+            Way continueFrom = getWayForNode(getCurrentBaseNode());
+            if (alt && continueFrom != null && (!getCurrentBaseNode().isSelected() || continueFrom.isSelected())) {
+                addRemoveSelection(currentDataSet, getCurrentBaseNode(), continueFrom);
                 needsRepaint = true;
             } else if (!alt && continueFrom != null && !continueFrom.isSelected()) {
@@ -211,5 +211,5 @@
         // isn't, set wayIsFinished to true to avoid superfluous repaints.
         determineCurrentBaseNodeAndPreviousNode(getCurrentDataSet().getSelected());
-        wayIsFinished = currentBaseNode == null;
+        wayIsFinished = getCurrentBaseNode() == null;
 
         toleranceMultiplier = 0.01 * NavigatableComponent.PROP_SNAP_DISTANCE.get();
@@ -808,14 +808,14 @@
         }
 
-        if (currentBaseNode == null || currentBaseNode == currentMouseNode)
+        if (getCurrentBaseNode() == null || getCurrentBaseNode() == currentMouseNode)
             return; // Don't create zero length way segments.
 
 
-        double curHdg = Math.toDegrees(currentBaseNode.getEastNorth()
+        double curHdg = Math.toDegrees(getCurrentBaseNode().getEastNorth()
                 .heading(currentMouseEastNorth));
         double baseHdg=-1;
         if (previousNode != null) {
             baseHdg =  Math.toDegrees(previousNode.getEastNorth()
-                    .heading(currentBaseNode.getEastNorth()));
+                    .heading(getCurrentBaseNode().getEastNorth()));
         }
 
@@ -938,5 +938,12 @@
     }
 
+    /**
+     * Replies the current base node, after having checked it is still usable (see #11105).
+     * @return the current base node (can be null). If not-null, it's guaranteed the node is usable
+     */
     public Node getCurrentBaseNode() {
+        if (currentBaseNode != null && (currentBaseNode.getDataSet() == null || !currentBaseNode.isUsable())) {
+            currentBaseNode = null;
+        }
         return currentBaseNode;
     }
@@ -1035,6 +1042,7 @@
         EastNorth p1=ws.getFirstNode().getEastNorth();
         EastNorth p2=ws.getSecondNode().getEastNorth();
-        if (snapHelper.dir2!=null && currentBaseNode!=null) {
-            EastNorth xPoint = Geometry.getSegmentSegmentIntersection(p1, p2, snapHelper.dir2, currentBaseNode.getEastNorth());
+        if (snapHelper.dir2 != null && getCurrentBaseNode() != null) {
+            EastNorth xPoint = Geometry.getSegmentSegmentIntersection(p1, p2, snapHelper.dir2,
+                    getCurrentBaseNode().getEastNorth());
             if (xPoint!=null) {
                 n.setEastNorth(xPoint);
@@ -1102,5 +1110,5 @@
         if (Main.map.mapView == null || mousePos == null
                 // don't draw line if we don't know where from or where to
-                || currentBaseNode == null || currentMouseEastNorth == null
+                || getCurrentBaseNode() == null || currentMouseEastNorth == null
                 // don't draw line if mouse is outside window
                 || !Main.map.mapView.getBounds().contains(mousePos))
@@ -1118,5 +1126,5 @@
             return;
         GeneralPath b = new GeneralPath();
-        Point p1=mv.getPoint(currentBaseNode);
+        Point p1=mv.getPoint(getCurrentBaseNode());
         Point p2=mv.getPoint(currentMouseEastNorth);
 
@@ -1175,5 +1183,5 @@
          * Check whether a connection will be made
          */
-        if (currentBaseNode != null && !wayIsFinished) {
+        if (getCurrentBaseNode() != null && !wayIsFinished) {
             if (alt) {
                 rv.append(" ").append(tr("Start new way from last node."));
@@ -1225,6 +1233,6 @@
         DataSet ds = getCurrentDataSet();
         if (ds == null) return null;
-        if (currentBaseNode != null && !ds.getSelected().isEmpty()) {
-            Way continueFrom = getWayForNode(currentBaseNode);
+        if (getCurrentBaseNode() != null && !ds.getSelected().isEmpty()) {
+            Way continueFrom = getWayForNode(getCurrentBaseNode());
             if (continueFrom != null)
                 return Collections.<OsmPrimitive>singleton(continueFrom);
@@ -1364,5 +1372,5 @@
             if (!snapOn || !active)
                 return;
-            Point p1=mv.getPoint(currentBaseNode);
+            Point p1=mv.getPoint(getCurrentBaseNode());
             Point p2=mv.getPoint(dir2);
             Point p3=mv.getPoint(projected);
@@ -1423,5 +1431,5 @@
          */
         public void checkAngleSnapping(EastNorth currentEN, double baseHeading, double curHeading) {
-            EastNorth p0 = currentBaseNode.getEastNorth();
+            EastNorth p0 = getCurrentBaseNode().getEastNorth();
             EastNorth snapPoint = currentEN;
             double angle = -1;
@@ -1473,5 +1481,5 @@
             // find out the distance, in metres, between the base point and projected point
             LatLon mouseLatLon = Main.map.mapView.getProjection().eastNorth2latlon(snapPoint);
-            double distance = currentBaseNode.getCoor().greatCircleDistance(mouseLatLon);
+            double distance = getCurrentBaseNode().getCoor().greatCircleDistance(mouseLatLon);
             double hdg = Math.toDegrees(p0.heading(snapPoint));
             // heading of segment from current to calculated point, not to mouse position
