fix for error in MOD_weightvgmix.c caused by confusion without braces.

CustomData_add_layer_named would run even when the dvert layer was found.
This commit is contained in:
Campbell Barton 2012-05-06 12:52:42 +00:00
parent eae05ff541
commit 71028de93b
1 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
dvert = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MDEFORMVERT, numVerts);
/* If no vertices were ever added to an object's vgroup, dvert might be NULL. */
if (!dvert)
if (!dvert) {
/* If not affecting all vertices, just return. */
if (wmd->mix_set != MOD_WVG_SET_ALL)
return dm;
@ -268,7 +268,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
/* Ultimate security check. */
if (!dvert)
return dm;
}
/* Find out which vertices to work on. */
tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGMix Modifier, tidx");
tdw1 = MEM_mallocN(sizeof(MDeformWeight*) * numVerts, "WeightVGMix Modifier, tdw1");