Fix bug #33176: Deactivating both position and rotation target from iTaSC IK-Solver crashes Blender. No constraint is created for target in that case, just needed to add a check.

This commit is contained in:
Benoit Bolsee
2012-12-06 22:23:58 +00:00
parent bf0102ffa4
commit d261d65bda

View File

@@ -1636,7 +1636,7 @@ static void execute_scene(Scene *blscene, IK_Scene *ikscene, bItasc *ikparam, fl
// compute constraint error
for (i = ikscene->targets.size(); i > 0; --i) {
IK_Target *iktarget = ikscene->targets[i - 1];
if (!(iktarget->blenderConstraint->flag & CONSTRAINT_OFF)) {
if (!(iktarget->blenderConstraint->flag & CONSTRAINT_OFF) && iktarget->constraint) {
unsigned int nvalues;
const iTaSC::ConstraintValues *values;
values = iktarget->constraint->getControlParameters(&nvalues);