Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-03 02:06:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-03 02:06:22 +0400
commit1782376d9786a7645372f21cc96baff1cea4716e (patch)
treea545d64eeccf14909f52ddd59f7121e2dc7cab2e /source/blender/modifiers/intern/MOD_laplaciandeform.c
parenta24f83855a29e530ee8f9cc069ff294f4ee28799 (diff)
Laplacian Deform Modifier: fix possible NULL pointer dereference.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_laplaciandeform.c')
-rw-r--r--source/blender/modifiers/intern/MOD_laplaciandeform.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c b/source/blender/modifiers/intern/MOD_laplaciandeform.c
index ec838c5fc41..df64bf63ff7 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) {