mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 09:16:53 +02:00
Fix index check in setJointRotation
This commit is contained in:
parent
d505527e5a
commit
e3f7c33767
1 changed files with 2 additions and 2 deletions
|
@ -270,12 +270,12 @@ void SkeletonModel::applyPalmData(int jointIndex, PalmData& palm) {
|
|||
}
|
||||
|
||||
void SkeletonModel::updateJointState(int index) {
|
||||
if (index > _jointStates.size()) {
|
||||
if (index < 0 && index >= _jointStates.size()) {
|
||||
return; // bail
|
||||
}
|
||||
JointState& state = _jointStates[index];
|
||||
const FBXJoint& joint = state.getFBXJoint();
|
||||
if (joint.parentIndex != -1 && joint.parentIndex <= _jointStates.size()) {
|
||||
if (joint.parentIndex >= 0 && joint.parentIndex < _jointStates.size()) {
|
||||
const JointState& parentState = _jointStates.at(joint.parentIndex);
|
||||
const FBXGeometry& geometry = _geometry->getFBXGeometry();
|
||||
if (index == geometry.leanJointIndex) {
|
||||
|
|
Loading…
Reference in a new issue