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:
parent
19e1b5c1fd
commit
a2f3aca647
|
@ -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;
|
||||
|
|
|
@ -69,7 +69,7 @@ Mesh *BKE_mesh_wrapper_from_editmesh_with_coords(BMEditMesh *em,
|
|||
|
||||
/* Use edit-mesh directly where possible. */
|
||||
me->runtime.is_original = true;
|
||||
me->edit_mesh = MEM_dupallocN(em);
|
||||
me->edit_mesh = em;
|
||||
|
||||
/* Make sure, we crash if these are ever used. */
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Reference in New Issue