mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:23:36 +02:00
Fix for crash on avatars with missing "Hips" joint
This commit is contained in:
parent
5202038210
commit
a43e9a5710
1 changed files with 5 additions and 1 deletions
|
@ -861,7 +861,11 @@ void AnimInverseKinematics::setSkeletonInternal(AnimSkeleton::ConstPointer skele
|
|||
_hipsIndex = _skeleton->nameToJointIndex("Hips");
|
||||
|
||||
// also cache the _hipsParentIndex for later
|
||||
_hipsParentIndex = _skeleton->getParentIndex(_hipsIndex);
|
||||
if (_hipsIndex >= 0) {
|
||||
_hipsParentIndex = _skeleton->getParentIndex(_hipsIndex);
|
||||
} else {
|
||||
_hipsParentIndex = -1;
|
||||
}
|
||||
} else {
|
||||
clearConstraints();
|
||||
_headIndex = -1;
|
||||
|
|
Loading…
Reference in a new issue