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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-05-09 16:42:19 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-05-09 16:42:19 +0400
commit1e30f000308debebf7cd5bbf6a9b37b8a94182de (patch)
treed6edeb35644fd1048d4b71d1f55ef1ab019bacef /source/blender/modifiers/intern/MOD_cloth.c
parent8a20433f0fef5ab2d881d010cd5bd19fe484e555 (diff)
parent80f6671dfe64ece1e692c8032e1d1169621bceff (diff)
Merged changes in the trunk up to revision 28685.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cloth.c')
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index 865157ce585..5050333cd43 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -123,15 +123,19 @@ static void copyData(ModifierData *md, ModifierData *target)
{
ClothModifierData *clmd = (ClothModifierData*) md;
ClothModifierData *tclmd = (ClothModifierData*) target;
-
- if(tclmd->sim_parms)
+
+ if(tclmd->sim_parms) {
+ if(tclmd->sim_parms->effector_weights)
+ MEM_freeN(tclmd->sim_parms->effector_weights);
MEM_freeN(tclmd->sim_parms);
+ }
+
if(tclmd->coll_parms)
MEM_freeN(tclmd->coll_parms);
BKE_ptcache_free_list(&tclmd->ptcaches);
tclmd->point_cache = NULL;
-
+
tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms);
if(clmd->sim_parms->effector_weights)
tclmd->sim_parms->effector_weights = MEM_dupallocN(clmd->sim_parms->effector_weights);