Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Matthews <johnny.matthews@gmail.com>2022-05-29 22:19:05 +0300
committerJohnny Matthews <johnny.matthews@gmail.com>2022-05-29 22:25:17 +0300
commitcc4b6c64764e2716558a6abb3fa912742ac3f00e (patch)
tree75862321d967202c116683e4916959ee8a94bb58 /source/blender/nodes
parent218f23935c508d5d4248913d08c22925bb16df5a (diff)
Fix T98400: Duplicate node crash
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc3
1 files changed, 3 insertions, 0 deletions
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 90837486186..ac057ad078b 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);
}