Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 6007)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 6008)
@@ -434,4 +434,5 @@
         Way wnew = new Way(selectedSegment.way);
         boolean wayWasModified = false;
+        boolean wayWasSingleSegment = wnew.getNodesCount() == 2;
         int insertionPoint = selectedSegment.lowerIndex + 1;
 
@@ -473,5 +474,5 @@
 
         //the way was a single segment, close the way
-        if (wnew.getNodesCount() == 4) {
+        if (wayWasSingleSegment) {
             wnew.addNode(selectedSegment.getFirstNode());
             wayWasModified = true;
