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>2013-11-04 01:11:27 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-11-04 01:11:27 +0400
commitc366f08b6f681ce84b75f402505873a313a80ca7 (patch)
tree43e6c6f91e7c3709851d3cd6c09125a5bf7c40a4 /source/blender/makesrna/intern/rna_fluidsim.c
parentddcb1166def10f5b180de9c6191f24801a5d6698 (diff)
Fix [#37297] Crash when Adding and Removing Fluid Particlesystem.
Using freed mem...
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluidsim.c')
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index b18c21d53f1..9007baa9dad 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -122,7 +122,7 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
Object *ob = (Object *)ptr->id.data;
FluidsimModifierData *fluidmd;
ParticleSystemModifierData *psmd;
- ParticleSystem *psys;
+ ParticleSystem *psys, *next_psys;
ParticleSettings *part;
fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
@@ -155,7 +155,8 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
}
}
else {
- for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ for (psys = ob->particlesystem.first; psys; psys = next_psys) {
+ next_psys = psys->next;
if (psys->part->type == PART_FLUID) {
/* clear modifier */
psmd = psys_get_modifier(ob, psys);