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:
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c12
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. */