Fix: Geometry Nodes Subdiv Surface Crash

If there are no edges in the mesh, the process would crash.
Returning in this case.
This commit is contained in:
Johnny Matthews 2021-10-16 07:24:30 -05:00
parent 5c961b3b58
commit 4a00faca1a
1 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,10 @@ static void geo_node_subdivision_surface_exec(GeoNodeExecParams params)
GeometryComponentFieldContext field_context{mesh_component, domain};
const int domain_size = mesh_component.attribute_domain_size(domain);
if (domain_size == 0) {
return;
}
FieldEvaluator evaluator(field_context, domain_size);
evaluator.add(crease_field);
evaluator.evaluate();