From ee71dce73022f8837493bba4b730a4eb722afbc6 Mon Sep 17 00:00:00 2001 From: Kulratan Thapar Date: Sun, 11 Jan 2026 08:35:14 +0000 Subject: [PATCH] Fix: Prevent integer underflow in Index Points node --- node-graph/nodes/vector/src/vector_nodes.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node-graph/nodes/vector/src/vector_nodes.rs b/node-graph/nodes/vector/src/vector_nodes.rs index a979db669f..81431f5a8e 100644 --- a/node-graph/nodes/vector/src/vector_nodes.rs +++ b/node-graph/nodes/vector/src/vector_nodes.rs @@ -2275,6 +2275,9 @@ async fn index_points( ) -> DVec2 { let points_count = content.iter().map(|row| row.element.point_domain.positions().len()).sum::(); + if points_count == 0 { + return DVec2::ZERO; + } // Clamp and allow negative indexing from the end let index = index as isize; let index = if index < 0 {