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:
authorJacques Lucke <jacques@blender.org>2021-01-28 19:03:34 +0300
committerJacques Lucke <jacques@blender.org>2021-01-28 19:03:34 +0300
commitfcb7b0adcc843f2dd90ba4175d6008c35ed3168f (patch)
treeb32ca2ecdeef16f25caae61657e09c29a912a9f8
parent133966423aa61f614541ef910c34aea3d2275057 (diff)
Fix T85157: join node not working when the second mesh is empty
The issue was that the `offset` in `dst_span[offset]` was out of bounds when the domain size is 0. The fix is to simply skip copying attributes in that case.
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
index 67bc095fa31..42402e23fa5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
@@ -163,6 +163,9 @@ static void fill_new_attribute(Span<const GeometryComponent *> src_components,
int offset = 0;
for (const GeometryComponent *component : src_components) {
const int domain_size = component->attribute_domain_size(domain);
+ if (domain_size == 0) {
+ continue;
+ }
ReadAttributePtr read_attribute = component->attribute_get_for_read(
attribute_name, domain, data_type, nullptr);