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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-08 15:21:02 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-08 15:22:14 +0300
commit49fe27ee46b4d9272957c21c13365db322ca8396 (patch)
tree235ed597431d68a62b3d7ac4f77c6599ccd09ba7 /source/blender/modifiers/intern/MOD_fluidsim.c
parent53580265118236a096257b50f29d354243bdefe3 (diff)
Modifiers: sanitize/cleanup modifiers' copying & freeing code.
Should also fix T55000: Crash with hooks and curves in Cycles render.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim.c')
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c
index 37eabdf2425..823e67a7bc9 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim.c
@@ -70,14 +70,17 @@ static void copyData(ModifierData *md, ModifierData *target)
FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
FluidsimModifierData *tfluidmd = (FluidsimModifierData *) target;
- 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);
}
}
+
+ /* Seems to never be used, but for sqke of consistency... */
+ BLI_assert(fluidmd->point_cache == NULL);
+ BLI_assert(tfluidmd->point_cache == NULL);
+ tfluidmd->point_cache = NULL;
}