From 390574d5c6f9282bf474d2d5bedb319dd6464d7d Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Tue, 25 Feb 2025 00:45:54 -0800 Subject: [PATCH] Limit the Sample to Points node's spacing value to prevent freezing when 0 --- node-graph/gcore/src/vector/vector_nodes.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node-graph/gcore/src/vector/vector_nodes.rs b/node-graph/gcore/src/vector/vector_nodes.rs index be1a9f4a..389ef988 100644 --- a/node-graph/gcore/src/vector/vector_nodes.rs +++ b/node-graph/gcore/src/vector/vector_nodes.rs @@ -635,6 +635,9 @@ async fn sample_points( )] subpath_segment_lengths: impl Node>, ) -> VectorDataTable { + // Limit the smallest spacing to something sensible to avoid freezing the application. + let spacing = spacing.max(0.01); + // Evaluate vector data and subpath segment lengths asynchronously. let vector_data = vector_data.eval(footprint).await; let vector_data = vector_data.one_item();