Fix bug #33176: Deactivating both position and rotation target from iTaSC IK-Solver...
[blender.git] / source / blender / ikplugin / intern / itasc_plugin.cpp
index 5cf762af3e882e447796546d2340e3add71fc600..903080d5b79bf55b7f90b498c4b2734092a91ca5 100644 (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);