Fix: Crash in Duplicate Element

Return early if a curve has a domain size of 0.
T96060
This commit is contained in:
Johnny Matthews 2022-02-27 15:16:45 -06:00
parent 4f2f3114b7
commit 63891f9dad
1 changed files with 3 additions and 0 deletions

View File

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