diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-04 01:11:27 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-04 01:11:27 +0400 |
commit | c366f08b6f681ce84b75f402505873a313a80ca7 (patch) | |
tree | 43e6c6f91e7c3709851d3cd6c09125a5bf7c40a4 /source | |
parent | ddcb1166def10f5b180de9c6191f24801a5d6698 (diff) |
Fix [#37297] Crash when Adding and Removing Fluid Particlesystem.
Using freed mem...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluidsim.c | 5 |
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); |