Fix T91732: crash in Set Position node on empty mesh
This commit is contained in:
@@ -450,7 +450,7 @@ Vector<const GVArray *> evaluate_fields(ResourceScope &scope,
|
||||
type, array_size, buffer);
|
||||
}
|
||||
|
||||
procedure_executor.call(IndexRange(1), mf_params, mf_context);
|
||||
procedure_executor.call(IndexRange(mask_size), mf_params, mf_context);
|
||||
}
|
||||
|
||||
/* Copy data to supplied destination arrays if necessary. In some cases the evaluation above has
|
||||
|
||||
@@ -34,6 +34,9 @@ static void set_position_in_component(GeometryComponent &component,
|
||||
{
|
||||
GeometryComponentFieldContext field_context{component, ATTR_DOMAIN_POINT};
|
||||
const int domain_size = component.attribute_domain_size(ATTR_DOMAIN_POINT);
|
||||
if (domain_size == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
fn::FieldEvaluator selection_evaluator{field_context, domain_size};
|
||||
selection_evaluator.add(selection_field);
|
||||
|
||||
Reference in New Issue
Block a user