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/modifiers/intern/MOD_cloth.c')
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index 11455a6461f..394b2ff412f 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -48,6 +48,7 @@
#include "BKE_cloth.h"
#include "BKE_cdderivedmesh.h"
+#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_modifier.h"
@@ -177,6 +178,8 @@ static void copyData(ModifierData *md, ModifierData *target)
tclmd->point_cache = BKE_ptcache_new();
tclmd->point_cache->step = 1;
tclmd->clothObject = NULL;
+ tclmd->hairdata = NULL;
+ tclmd->solver_result = NULL;
}
static bool dependsOnTime(ModifierData *UNUSED(md))
@@ -204,6 +207,12 @@ static void freeData(ModifierData *md)
BKE_ptcache_free(clmd->point_cache);
clmd->point_cache = NULL;
+
+ if (clmd->hairdata)
+ MEM_freeN(clmd->hairdata);
+
+ if (clmd->solver_result)
+ MEM_freeN(clmd->solver_result);
}
}