Fix memory leak with building springs in the cloth simulator
Error in 2788b0261c
.
This commit is contained in:
parent
a48df97ada
commit
9e2cd6b077
Notes:
blender-bot
2023-02-14 11:21:40 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
|
@ -42,6 +42,7 @@
|
|||
#include "BKE_cloth.h"
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_lib_id.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_mesh_runtime.h"
|
||||
#include "BKE_modifier.h"
|
||||
|
@ -1574,7 +1575,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
|
|||
BLI_edgeset_free(existing_vert_pairs);
|
||||
free_bvhtree_from_mesh(&treedata);
|
||||
if (tmp_mesh) {
|
||||
BKE_mesh_free_data(tmp_mesh);
|
||||
BKE_id_free(NULL, &tmp_mesh->id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1583,7 +1584,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
|
|||
BLI_edgeset_free(existing_vert_pairs);
|
||||
free_bvhtree_from_mesh(&treedata);
|
||||
if (tmp_mesh) {
|
||||
BKE_mesh_free_data(tmp_mesh);
|
||||
BKE_id_free(NULL, &tmp_mesh->id);
|
||||
}
|
||||
BLI_rng_free(rng);
|
||||
}
|
||||
|
|
|
@ -1649,6 +1649,7 @@ static int lineart_edge_type_duplication_count(char eflag)
|
|||
}
|
||||
static void lineart_geometry_object_load(LineartObjectInfo *obi, LineartRenderBuffer *rb)
|
||||
{
|
||||
printf("========================================================\nTESTING\n");
|
||||
BMesh *bm;
|
||||
BMVert *v;
|
||||
BMFace *f;
|
||||
|
|
Loading…
Reference in New Issue