diff options
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index b9b9ea6b4f3..3b47c2f1830 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5971,6 +5971,8 @@ static void clothModifier_copyData(ModifierData *md, ModifierData *target) 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); tclmd->coll_parms = MEM_dupallocN(clmd->coll_parms); tclmd->point_cache = BKE_ptcache_copy_list(&tclmd->ptcaches, &clmd->ptcaches); tclmd->clothObject = NULL; @@ -5992,8 +5994,11 @@ static void clothModifier_freeData(ModifierData *md) cloth_free_modifier_extern (clmd); - if(clmd->sim_parms) + if(clmd->sim_parms) { + if(clmd->sim_parms->effector_weights) + MEM_freeN(clmd->sim_parms->effector_weights); MEM_freeN(clmd->sim_parms); + } if(clmd->coll_parms) MEM_freeN(clmd->coll_parms); |