Cleanup: remove BKE_mesh_free_data use for lineart mesh copies

Even though this didn't leak memory, BKE_mesh_free_data doesn't
handle freeing data that is part of the ID making it error prone.
This commit is contained in:
Campbell Barton 2021-08-20 16:08:35 +10:00
parent 15a46a8b72
commit 40f0783d51
1 changed files with 2 additions and 2 deletions

View File

@ -41,6 +41,7 @@
#include "BKE_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_lib_id.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
@ -1691,8 +1692,7 @@ static void lineart_geometry_object_load(LineartObjectInfo *obi, LineartRenderBu
}
if (obi->free_use_mesh) {
BKE_mesh_free_data(obi->original_me);
MEM_freeN(obi->original_me);
BKE_id_free(NULL, &obi->original_me);
}
if (rb->remove_doubles) {