When extracting past the end of the path, start with a moveTo.
diff --git a/src/shapes/paint/trim_path.cpp b/src/shapes/paint/trim_path.cpp index 972aa35..b62cd65 100644 --- a/src/shapes/paint/trim_path.cpp +++ b/src/shapes/paint/trim_path.cpp
@@ -98,7 +98,7 @@ { startLength = 0; endLength -= pathLength; - path->trim(startLength, endLength, false, m_TrimmedPath); + path->trim(startLength, endLength, true, m_TrimmedPath); } } }