[Bf-blender-cvs] [1782376] master: Laplacian Deform Modifier: fix possible NULL pointer dereference.
Campbell Barton
noreply at git.blender.org
Mon Dec 2 23:26:26 CET 2013
Commit: 1782376d9786a7645372f21cc96baff1cea4716e
Author: Campbell Barton
Date: Tue Dec 3 09:06:22 2013 +1100
http://developer.blender.org/rB1782376d9786a7645372f21cc96baff1cea4716e
Laplacian Deform Modifier: fix possible NULL pointer dereference.
===================================================================
M source/blender/modifiers/intern/MOD_laplaciandeform.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c b/source/blender/modifiers/intern/MOD_laplaciandeform.c
index ec838c5..df64bf6 100644
--- a/source/blender/modifiers/intern/MOD_laplaciandeform.c
+++ b/source/blender/modifiers/intern/MOD_laplaciandeform.c
@@ -721,10 +721,13 @@ static void LaplacianDeformModifier_do(
MEM_SAFE_FREE(lmd->vertexco);
lmd->total_verts = 0;
deleteLaplacianSystem(sys);
+ lmd->cache_system = NULL;
initSystem(lmd, ob, dm, filevertexCos, numVerts);
sys = lmd->cache_system; /* may have been reallocated */
MEM_SAFE_FREE(filevertexCos);
- laplacianDeformPreview(sys, vertexCos);
+ if (sys) {
+ laplacianDeformPreview(sys, vertexCos);
+ }
}
else {
if (sysdif == LAPDEFORM_SYSTEM_CHANGE_VERTEXES) {
More information about the Bf-blender-cvs
mailing list