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-06-06 19:10:27 +0300
committerJohnny Matthews <johnny.matthews@gmail.com>2022-06-06 19:15:24 +0300
commitf700aa67ac67ac1e5996618074f32df30dfccccd (patch)
tree1faf0c2d6097f672ed99d3f99d80e97910e2a1df /source/blender/nodes
parent3772dda4ab1b071676a051e76324262a0d90dd49 (diff)
Geometry Nodes: Fix Assert in Duplicate Elements
The original assert did not take into account the offset size in the loop being -1. The tests were then run in non-debug mode, so while the mesh regressions still passed, the false positive asserts that happened were not caught. Differential Revision: https://developer.blender.org/D15136
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc2
1 files changed, 1 insertions, 1 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 cde40319388..691f341b518 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -98,7 +98,7 @@ static void threaded_slice_fill(Span<int> offsets,
MutableSpan<T> dst)
{
BLI_assert(offsets.last() == dst.size());
- BLI_assert(selection.size() == offsets.size());
+ BLI_assert(selection.size() == offsets.size() - 1);
threading::parallel_for(IndexRange(offsets.size() - 1), 512, [&](IndexRange range) {
for (const int i : range) {
dst.slice(range_for_offsets_index(offsets, i)).fill(src[selection[i]]);