AvatarRig: fix for crash when index was -1

This commit is contained in:
Anthony J. Thibault 2015-11-05 09:43:41 -08:00
parent 8d16f60b15
commit 2318e48fa8

View file

@ -13,7 +13,7 @@
/// Updates the state of the joint at the specified index.
void AvatarRig::updateJointState(int index, glm::mat4 rootTransform) {
if (index < 0 && index >= _jointStates.size()) {
if (index < 0 || index >= _jointStates.size()) {
return; // bail
}
JointState& state = _jointStates[index];