[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61074] trunk/blender/source/blender/ makesrna/intern/rna_fluidsim.c: Fix [#37297] Crash when Adding and Removing Fluid Particlesystem.

Bastien Montagne montagne29 at wanadoo.fr
Sun Nov 3 22:11:27 CET 2013


Revision: 61074
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61074
Author:   mont29
Date:     2013-11-03 21:11:27 +0000 (Sun, 03 Nov 2013)
Log Message:
-----------
Fix [#37297] Crash when Adding and Removing Fluid Particlesystem.

Using freed mem...

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c	2013-11-03 18:04:45 UTC (rev 61073)
+++ trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c	2013-11-03 21:11:27 UTC (rev 61074)
@@ -122,7 +122,7 @@
 	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 @@
 		}
 	}
 	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);




More information about the Bf-blender-cvs mailing list