From 63891f9dad930f3d766d8586b909ca59ba089f3e Mon Sep 17 00:00:00 2001 From: Johnny Matthews Date: Sun, 27 Feb 2022 15:16:45 -0600 Subject: Fix: Crash in Duplicate Element Return early if a curve has a domain size of 0. T96060 --- source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') 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}; -- cgit v1.2.3