diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-06 06:59:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-06 07:24:16 +0300 |
commit | bc97d7832906318a1185b3fb460b1d8d89020ba0 (patch) | |
tree | 096969472b2a5ad82c56d8f616cd398f47840bdf /source/blender/blenkernel/intern/cloth.c | |
parent | 99738fbfdc8b4639d95c796bcc8711bd89c1aaa4 (diff) |
Cleanup: use MEM_SAFE_FREE macro
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 0fa58a74f2b..f5ff936e18b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -447,11 +447,7 @@ void cloth_free_modifier(ClothModifierData *clmd) SIM_cloth_solver_free(clmd); /* Free the verts. */ - if (cloth->verts != NULL) { - MEM_freeN(cloth->verts); - } - - cloth->verts = NULL; + MEM_SAFE_FREE(cloth->verts); cloth->mvert_num = 0; /* Free the springs. */ @@ -529,11 +525,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd) SIM_cloth_solver_free(clmd); /* Free the verts. */ - if (cloth->verts != NULL) { - MEM_freeN(cloth->verts); - } - - cloth->verts = NULL; + MEM_SAFE_FREE(cloth->verts); cloth->mvert_num = 0; /* Free the springs. */ |