diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2021-10-16 15:24:30 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2021-10-16 15:26:57 +0300 |
commit | 4a00faca1a5e86ee3fb2d55ec98bf5f9ef0ae66a (patch) | |
tree | 3366bbc1c7a4d4a9d71256a60dc00ac5c3569148 /source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc | |
parent | 5c961b3b582f77f9f7e9fa99476217753c424d32 (diff) |
Fix: Geometry Nodes Subdiv Surface Crash
If there are no edges in the mesh, the process would crash.
Returning in this case.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc index d37f968caa8..5b480f2dc22 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc @@ -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(); |