From a40b810721f7cf04a47e569c1b1a4680a3ef61bc Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 18 Apr 2025 19:09:20 +0200 Subject: fix NoneType error in auto_fill travel (#3659) --- lib/stitches/auto_fill.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py index d5dd1d7d..bcde63e7 100644 --- a/lib/stitches/auto_fill.py +++ b/lib/stitches/auto_fill.py @@ -894,6 +894,10 @@ def travel(shape, travel_graph, edge, running_stitch_length, running_stitch_tole path = [InkstitchPoint.from_tuple(point) for point in path] if len(path) > 1: path = clamp_path_to_polygon(path, shape) + elif not path: + # This may happen on very small shapes. + # Simply return nothing as we do not want to error out + return [] points = even_running_stitch(path, running_stitch_length, running_stitch_tolerance) stitches = [Stitch(point) for point in points] -- cgit v1.2.3