diff --git a/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py b/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py index 0c9a18f8c0..d0bda652c4 100644 --- a/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py +++ b/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py @@ -818,6 +818,8 @@ class ObjectDressup: # Get finish index of mill command for one profile def findLastCutMultiProfileIndex(self, source, startIndex): + if startIndex >= len(source): + return len(source) - 1 for i in range(startIndex, len(source), +1): if not self.isCuttingMove(source[i]): return i - 1