diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2005-08-28 03:04:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2005-08-28 03:04:37 +0400 |
commit | fa443a5f019f7936014b089b07c5a3e8cddba4c6 (patch) | |
tree | 746afd87fc13f47891965c2a7e826e93aec62ff1 /intern/iksolver | |
parent | adc1d7137a986f89f1ea1a43ad0ebacff89ffca8 (diff) |
Bugfix; the IK solver would crash if there were 0 DOF's in the chain.
Diffstat (limited to 'intern/iksolver')
-rw-r--r-- | intern/iksolver/intern/IK_QJacobianSolver.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/iksolver/intern/IK_QJacobianSolver.cpp b/intern/iksolver/intern/IK_QJacobianSolver.cpp index 312b3146619..8ae836a7eb8 100644 --- a/intern/iksolver/intern/IK_QJacobianSolver.cpp +++ b/intern/iksolver/intern/IK_QJacobianSolver.cpp @@ -57,6 +57,9 @@ bool IK_QJacobianSolver::Setup(IK_QSegment *root, std::list<IK_QTask*>& tasks) num_dof += (*seg)->NumberOfDoF(); } + if (num_dof == 0) + return false; + // compute task id's and assing weights to task int primary_size = 0, primary = 0; int secondary_size = 0, secondary = 0; |