Fix 'Offset Path' node crash on empty or zero-scaled geometry

This commit is contained in:
Keavon Chambers 2026-05-06 01:33:11 -07:00
parent 39a7c45ccd
commit 05f6138b65
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ pub fn offset_bezpath(bezpath: &BezPath, distance: f64, join: Join, miter_limit:
})
.collect::<Vec<BezPath>>();
if bezpaths.is_empty() {
return BezPath::new();
}
// Clip or join consecutive Subpaths
for i in 0..bezpaths.len() - 1 {
let j = i + 1;