Commit: 63891f9dad930f3d766d8586b909ca59ba089f3e
Author: Johnny Matthews
Date:   Sun Feb 27 15:16:45 2022 -0600
Branches: master
https://developer.blender.org/rB63891f9dad930f3d766d8586b909ca59ba089f3e

Fix: Crash in Duplicate Element
Return early if a curve has a domain size of 0.
T96060

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

M       source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc

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

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 4c1d26e1012..c247a255e5b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -771,6 +771,9 @@ static void duplicate_points_curve(const 
GeometryComponentType component_type,
 {
   const GeometryComponent &src_component = 
*geometry_set.get_component_for_read(component_type);
   const int domain_size = 
src_component.attribute_domain_size(ATTR_DOMAIN_POINT);
+  if (domain_size == 0) {
+    return;
+  }
 
   GeometryComponentFieldContext field_context{src_component, 
ATTR_DOMAIN_POINT};
   FieldEvaluator evaluator{field_context, domain_size};

_______________________________________________
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