ignore empty paths in closed_loops()
@@ -673,6 +673,7 @@ def closed_loops(
path.user_data, const.BoundaryPathState
), "missing attached boundary path state"
for sub_path in path.sub_paths():
+ if len(sub_path):
sub_path.close()
loops.append(sub_path)
return loops
