Cleanup: remove redundant edit-mesh memory allocation

This memory was only duplicated to satisfy mesh_data_free
which was incorrectly freeing the pointer (but nothing else).
This commit is contained in:
2021-09-02 15:29:37 +10:00
parent 19e1b5c1fd
commit a2f3aca647
2 changed files with 3 additions and 3 deletions

View File

@@ -212,12 +212,12 @@ void BKE_editmesh_free_derived_caches(BMEditMesh *em)
{
if (em->mesh_eval_cage) {
Mesh *me = em->mesh_eval_cage;
MEM_SAFE_FREE(me->edit_mesh);
me->edit_mesh = NULL;
BKE_id_free(NULL, me);
}
if (em->mesh_eval_final && em->mesh_eval_final != em->mesh_eval_cage) {
Mesh *me = em->mesh_eval_final;
MEM_SAFE_FREE(me->edit_mesh);
me->edit_mesh = NULL;
BKE_id_free(NULL, me);
}
em->mesh_eval_cage = em->mesh_eval_final = NULL;