diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2022-02-28 00:16:45 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2022-02-28 00:16:45 +0300 |
commit | 63891f9dad930f3d766d8586b909ca59ba089f3e (patch) | |
tree | e641c76b99ee0d9a3c1cde4594609a91bb371074 | |
parent | 4f2f3114b7be2760d74ef1024626dd9f960a7bf3 (diff) |
Fix: Crash in Duplicate Element
Return early if a curve has a domain size of 0.
T96060
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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}; |