fix for uninitialized stack variable in displaying the modifier template.

This commit is contained in:
Campbell Barton 2011-02-22 12:19:27 +00:00
parent 8089f857ad
commit 99d3b68d70

@ -247,6 +247,11 @@ int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *lastPossibleCag
ModifierData *md = (virtual_)? modifiers_getVirtualModifierList(ob): ob->modifiers.first;
int i, cageIndex = -1;
if(lastPossibleCageIndex_r) {
/* ensure the value is initialized */
*lastPossibleCageIndex_r= -1;
}
/* Find the last modifier acting on the cage. */
for (i=0; md; i++,md=md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);