Index: trunk/src/org/openstreetmap/josm/data/osm/IWaySegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/IWaySegment.java	(revision 17985)
+++ trunk/src/org/openstreetmap/josm/data/osm/IWaySegment.java	(revision 17986)
@@ -23,5 +23,6 @@
 
     /**
-     * The way.
+     * Returns the way.
+     * @return the way
      */
     public W getWay() {
@@ -30,5 +31,6 @@
 
     /**
-     * The index of the first of the 2 nodes in the way.
+     * Returns the index of the first of the 2 nodes in the way.
+     * @return index of the first of the 2 nodes in the way
      * @see #getUpperIndex()
      * @see #getFirstNode()
@@ -39,5 +41,6 @@
 
     /**
-     * The index of the second of the 2 nodes in the way.
+     * Returns the index of the second of the 2 nodes in the way.
+     * @return the index of the second of the 2 nodes in the way
      * @see #getLowerIndex()
      * @see #getSecondNode()
@@ -62,4 +65,13 @@
 
     /**
+     * Determines if the segment is usable (node not deleted).
+     * @return {@code true} if the segment is usable
+     * @since 17986
+     */
+    public boolean isUsable() {
+        return getUpperIndex() < way.getNodesCount();
+    }
+
+    /**
      * Returns the first node of the way segment.
      * @return the first node
@@ -79,4 +91,6 @@
     /**
      * Determines and returns the way segment for the given way and node pair.
+     * @param <N> type of node
+     * @param <W> type of way
      * @param way way
      * @param first first node
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 17985)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 17986)
@@ -1291,5 +1291,5 @@
             MapViewPath highlightSegs = null;
             for (WaySegment ws : highlightWaySegments) {
-                if (ws.getWay() != way || ws.getLowerIndex() < offset) {
+                if (ws.getWay() != way || ws.getLowerIndex() < offset || !ws.isUsable()) {
                     continue;
                 }
