diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-06 22:28:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-06 22:28:21 +0300 |
commit | f286df75c099b3ff4bf2b53fc58730c5c6faa362 (patch) | |
tree | eb8b9b96b607dab5d6b204ed699cad585e9d9f31 /source/blender/modifiers/intern/MOD_particlesystem.c | |
parent | 31e6978066fcea3e65b187f055fdffb8da5731f9 (diff) |
...And fix memleak in previous commit, sigh...
Diffstat (limited to 'source/blender/modifiers/intern/MOD_particlesystem.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_particlesystem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index 79730b5f7b2..6af783b8b11 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); } |