From 479688d86bcdae846ef201e5fbb3581679e7c102 Mon Sep 17 00:00:00 2001 From: Kulcode <152772205+jsjgdh@users.noreply.github.com> Date: Mon, 12 Jan 2026 05:21:55 +0530 Subject: [PATCH] Fix integer underflow in Index Points node (#3623) 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 a979db66..81431f5a 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 {