Fix memory leak from rB263fa406cd2b

This commit is contained in:
Hans Goudey 2021-08-05 21:10:54 -05:00
parent 1f8485ae82
commit 99738fbfdc
Notes: blender-bot 2023-02-21 17:59:30 +01:00
Referenced by issue #93896, Vertex group (memory access?) change after applying modifier
Referenced by issue #93896, Vertex group (memory access?) change after applying modifier
1 changed files with 1 additions and 0 deletions

View File

@ -1666,6 +1666,7 @@ void BKE_mesh_nomain_to_mesh(Mesh *mesh_src,
/* skip the listbase */
MEMCPY_STRUCT_AFTER(mesh_dst, &tmp, id.prev);
BLI_freelistN(&mesh_dst->vertex_group_names);
BKE_defgroup_copy_list(&mesh_dst->vertex_group_names, &mesh_src->vertex_group_names);
mesh_dst->vertex_group_active_index = mesh_src->vertex_group_active_index;