coverity issue CID: 307

Checker: FORWARD_NULL (help)
File: base/src/source/blender/blenkernel/intern/modifier.c
Function: meshdeformModifier_deformVerts
Description: Variable "dm" tracked as NULL was passed to a function that dereferences it.

fix provided by Brecht.

Kent
This commit is contained in:
Kent Mein 2009-06-13 22:23:24 +00:00
parent a7ac260cc5
commit 472239cc94
1 changed files with 6 additions and 4 deletions

View File

@ -7813,10 +7813,12 @@ static void meshdeformModifier_deformVerts(
{
DerivedMesh *dm;
if(!derivedData && ob->type==OB_MESH)
dm= CDDM_from_mesh(ob->data, ob);
else
dm= derivedData;
if (!derivedData) {
dm= get_original_dm(ob, NULL, 0);
if (dm == NULL) return;
}
else dm= derivedData;
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */