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-12-09 15:54:34 +0300
committerJacques Lucke <jacques@blender.org>2021-12-09 15:54:47 +0300
commit74fa4ee92bc3d4fba6b315d768d3211d2fcb2a30 (patch)
treece0281caee5361235a74c6f7dd45be619fc28138 /source/blender
parentd812e46f40bce18f37b192f423e61360239a295c (diff)
Fix (unreported): missing null check
A crash happened when `instance_id_attribute` further down in the function was null. This issue was probably introduced when the id attribute starting using generic attribute handling.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_point_instance.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_point_instance.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_point_instance.cc
index ef35bef96aa..c8d9a6e9c7c 100644
--- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_point_instance.cc
+++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_point_instance.cc
@@ -173,6 +173,9 @@ static void add_instances_from_component(InstancesComponent &instances,
const AttributeDomain domain = ATTR_DOMAIN_POINT;
const int domain_size = src_geometry.attribute_domain_size(domain);
+ if (domain_size == 0) {
+ return;
+ }
VArray<float3> positions = src_geometry.attribute_get_for_read<float3>(
"position", domain, {0, 0, 0});