Commit: 74fa4ee92bc3d4fba6b315d768d3211d2fcb2a30
Author: Jacques Lucke
Date:   Thu Dec 9 13:54:34 2021 +0100
Branches: master
https://developer.blender.org/rB74fa4ee92bc3d4fba6b315d768d3211d2fcb2a30

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.

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

M       
source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_point_instance.cc

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

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});

_______________________________________________
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