Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-06 06:59:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-06 07:24:16 +0300
commitbc97d7832906318a1185b3fb460b1d8d89020ba0 (patch)
tree096969472b2a5ad82c56d8f616cd398f47840bdf /source/blender/editors/mesh
parent99738fbfdc8b4639d95c796bcc8711bd89c1aaa4 (diff)
Cleanup: use MEM_SAFE_FREE macro
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c5
-rw-r--r--source/blender/editors/mesh/mesh_mirror.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 85c646d689c..c6a8e771362 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -355,10 +355,7 @@ void EDBM_mesh_clear(BMEditMesh *em)
/* free tessellation data */
em->tottri = 0;
- if (em->looptris) {
- MEM_freeN(em->looptris);
- em->looptris = NULL;
- }
+ MEM_SAFE_FREE(em->looptris);
}
void EDBM_mesh_load(Main *bmain, Object *ob)
diff --git a/source/blender/editors/mesh/mesh_mirror.c b/source/blender/editors/mesh/mesh_mirror.c
index 5eb69aab48b..1a3e6a59588 100644
--- a/source/blender/editors/mesh/mesh_mirror.c
+++ b/source/blender/editors/mesh/mesh_mirror.c
@@ -365,10 +365,7 @@ void ED_mesh_mirrtopo_init(BMEditMesh *em,
void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store)
{
- if (mesh_topo_store->index_lookup) {
- MEM_freeN(mesh_topo_store->index_lookup);
- }
- mesh_topo_store->index_lookup = NULL;
+ MEM_SAFE_FREE(mesh_topo_store->index_lookup);
mesh_topo_store->prev_vert_tot = -1;
mesh_topo_store->prev_edge_tot = -1;
}