mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 23:54:04 +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");
|
_hipsIndex = _skeleton->nameToJointIndex("Hips");
|
||||||
|
|
||||||
// also cache the _hipsParentIndex for later
|
// also cache the _hipsParentIndex for later
|
||||||
_hipsParentIndex = _skeleton->getParentIndex(_hipsIndex);
|
if (_hipsIndex >= 0) {
|
||||||
|
_hipsParentIndex = _skeleton->getParentIndex(_hipsIndex);
|
||||||
|
} else {
|
||||||
|
_hipsParentIndex = -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
clearConstraints();
|
clearConstraints();
|
||||||
_headIndex = -1;
|
_headIndex = -1;
|
||||||
|
|
Loading…
Reference in a new issue