diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-06-21 16:14:42 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-06-21 16:14:42 +0300 |
commit | 4ceb006706579a0ad2301d2cde57489b69a7683c (patch) | |
tree | 3825806212dd3d3e5f8a44a16b9b82cfe8142c81 /source/blender/modifiers/intern/MOD_fluidsim.c | |
parent | 2ae172ec32da4a1aacd268bdba45bf82cff7eea9 (diff) | |
parent | 22466a5bdff73afb6ad3afd408e265517e4f3733 (diff) |
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c index 3e7141c3ce3..85eb7b2ffc9 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim.c +++ b/source/blender/modifiers/intern/MOD_fluidsim.c @@ -68,12 +68,13 @@ static void copyData(ModifierData *md, ModifierData *target) FluidsimModifierData *fluidmd = (FluidsimModifierData *) md; FluidsimModifierData *tfluidmd = (FluidsimModifierData *) target; - if (tfluidmd->fss) - MEM_freeN(tfluidmd->fss); - - tfluidmd->fss = MEM_dupallocN(fluidmd->fss); - if (tfluidmd->fss && (tfluidmd->fss->meshVelocities != NULL)) { - tfluidmd->fss->meshVelocities = MEM_dupallocN(tfluidmd->fss->meshVelocities); + fluidsim_free(tfluidmd); + + if (fluidmd->fss) { + tfluidmd->fss = MEM_dupallocN(fluidmd->fss); + if (tfluidmd->fss && (tfluidmd->fss->meshVelocities != NULL)) { + tfluidmd->fss->meshVelocities = MEM_dupallocN(tfluidmd->fss->meshVelocities); + } } } |