Fix: memory leak when using node tool in mesh edit mode

Caused by b40a9ce60b.

For the non-edit mode code path, the mesh is freed as part of
`BKE_mesh_nomain_to_mesh`.
This commit is contained in:
Jacques Lucke
2024-03-13 10:44:39 +01:00
parent 5c65dba14c
commit 48aec82426
@@ -226,6 +226,7 @@ static void store_result_geometry(
if (object.mode == OB_MODE_EDIT) {
EDBM_mesh_make_from_mesh(&object, new_mesh, scene.toolsettings->selectmode, true);
BKE_editmesh_looptris_and_normals_calc(mesh.edit_mesh);
BKE_id_free(nullptr, new_mesh);
}
else {
BKE_mesh_nomain_to_mesh(new_mesh, &mesh, &object);