Commit: 32bf6455a019221764b22c43754e701b7d6e3c8e
Author: Johnny Matthews
Date:   Sun May 29 14:19:05 2022 -0500
Branches: blender-v3.2-release
https://developer.blender.org/rB32bf6455a019221764b22c43754e701b7d6e3c8e

Fix T98400: Duplicate node crash

===================================================================

M       source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc 
b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index 1b26cfe31fe..75987ec2317 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -128,6 +128,9 @@ static void threaded_id_offset_copy(const Span<int> offsets,
     for (const int i : range) {
       dst[offsets[i]] = src[i];
       const int count = offsets[i + 1] - offsets[i];
+      if (count == 0) {
+        continue;
+      }
       for (const int i_duplicate : IndexRange(1, count - 1)) {
         dst[offsets[i] + i_duplicate] = noise::hash(src[i], i_duplicate);
       }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to