[Bf-blender-cvs] [f286df7] master: ...And fix memleak in previous commit, sigh...

Bastien Montagne noreply at git.blender.org
Wed Jan 6 20:28:46 CET 2016


Commit: f286df75c099b3ff4bf2b53fc58730c5c6faa362
Author: Bastien Montagne
Date:   Wed Jan 6 20:28:21 2016 +0100
Branches: master
https://developer.blender.org/rBf286df75c099b3ff4bf2b53fc58730c5c6faa362

...And fix memleak in previous commit, sigh...

===================================================================

M	source/blender/modifiers/intern/MOD_particlesystem.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c
index 79730b5..6af783b 100644
--- a/source/blender/modifiers/intern/MOD_particlesystem.c
+++ b/source/blender/modifiers/intern/MOD_particlesystem.c
@@ -165,9 +165,11 @@ static void deformVerts(ModifierData *md, Object *ob,
 		dm = ob->derivedDeform;
 		if (!dm) {
 			/* Can happen, e.g. when rendering from Edit mode... */
-			dm = get_dm(ob, NULL, NULL, vertexCos, false, true);
+			psmd->dm_deformed = get_dm(ob, NULL, NULL, vertexCos, false, true);
+		}
+		else {
+			psmd->dm_deformed = CDDM_copy(dm);
 		}
-		psmd->dm_deformed = CDDM_copy(dm);
 		DM_ensure_tessface(psmd->dm_deformed);
 	}




More information about the Bf-blender-cvs mailing list