Fix #108817: Extrude node crash with vertex-only input
The `.edge_verts`attribute might not exist if there were no edges.
This commit is contained in:
@@ -129,6 +129,10 @@ static void expand_mesh(Mesh &mesh,
|
||||
CustomData_realloc(&mesh.vdata, old_verts_num, mesh.totvert);
|
||||
}
|
||||
if (edge_expand != 0) {
|
||||
if (mesh.totedge == 0) {
|
||||
mesh.attributes_for_write().add(
|
||||
".edge_verts", ATTR_DOMAIN_EDGE, CD_PROP_INT32_2D, bke::AttributeInitConstruct());
|
||||
}
|
||||
CustomData_free_layers(&mesh.edata, CD_BWEIGHT, mesh.totedge);
|
||||
CustomData_free_layers(&mesh.edata, CD_FREESTYLE_EDGE, mesh.totedge);
|
||||
const int old_edges_num = mesh.totedge;
|
||||
|
||||
Reference in New Issue
Block a user