Skip to content

Commit 390574d

Browse files
committed
Limit the Sample to Points node's spacing value to prevent freezing when 0
1 parent 674db97 commit 390574d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

node-graph/gcore/src/vector/vector_nodes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,9 @@ async fn sample_points<F: 'n + Send + Copy>(
635635
)]
636636
subpath_segment_lengths: impl Node<F, Output = Vec<f64>>,
637637
) -> VectorDataTable {
638+
// Limit the smallest spacing to something sensible to avoid freezing the application.
639+
let spacing = spacing.max(0.01);
640+
638641
// Evaluate vector data and subpath segment lengths asynchronously.
639642
let vector_data = vector_data.eval(footprint).await;
640643
let vector_data = vector_data.one_item();

0 commit comments

Comments
 (0)