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
path: root/source
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-04-22 02:02:15 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-04-22 02:02:15 +0400
commita1b1cfdc388db65c563da5d8da1c920e5ba02bd9 (patch)
treeba3b432389cb291036b2913d6a624355022d9f79 /source
parente2cac820f975775aa9f20a4c107b0c3575049d6a (diff)
Cloth: Fix point cache memory leak when duplicating cloth
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/modifier.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 8fc6a026005..0cd6035b9dc 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -5142,11 +5142,14 @@ static void clothModifier_copyData(ModifierData *md, ModifierData *target)
if(tclmd->sim_parms)
MEM_freeN(tclmd->sim_parms);
if(tclmd->coll_parms)
- MEM_freeN(tclmd->coll_parms);
+ MEM_freeN(tclmd->coll_parms);
+ if(tclmd->point_cache)
+ BKE_ptcache_free(tclmd->point_cache);
tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms);
tclmd->coll_parms = MEM_dupallocN(clmd->coll_parms);
tclmd->point_cache = BKE_ptcache_copy(clmd->point_cache);
+ tclmd->clothObject = NULL;
}
static int clothModifier_dependsOnTime(ModifierData *md)