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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-04-14 13:36:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-04-14 13:39:54 +0300
commit95b36321126fd6f9563b309930ac9ae6cf422a81 (patch)
tree0722b78d4ffc69d49926d34d7ac0a9816c30dacd /source/blender/modifiers/intern/MOD_surfacedeform.c
parent6cda217a82078d7bdf61caec458154a507a58947 (diff)
parent0b55b8cc6a37fa4e74c55c9ccb54950c5f546bd6 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/alembic/intern/abc_exporter.cc
Diffstat (limited to 'source/blender/modifiers/intern/MOD_surfacedeform.c')
-rw-r--r--source/blender/modifiers/intern/MOD_surfacedeform.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 4f5814b7ad8..bf6a0bdd234 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -1103,6 +1103,11 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un
tdm = smd->target->derivedFinal;
}
+ if (!tdm) {
+ modifier_setError(md, "No valid target mesh");
+ return;
+ }
+
tnumverts = tdm->getNumVerts(tdm);
tnumpoly = tdm->getNumPolys(tdm);
@@ -1122,12 +1127,10 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un
/* Poly count checks */
if (smd->numverts != numverts) {
modifier_setError(md, "Verts changed from %u to %u", smd->numverts, numverts);
- tdm->release(tdm);
return;
}
else if (smd->numpoly != tnumpoly) {
modifier_setError(md, "Target polygons changed from %u to %u", smd->numpoly, tnumpoly);
- tdm->release(tdm);
return;
}
@@ -1153,8 +1156,6 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un
MEM_freeN(data.targetCos);
}
-
- tdm->release(tdm);
}
static void deformVerts(ModifierData *md, Object *ob,