improved index sanity checking

This commit is contained in:
Andrew Meadows 2014-03-12 15:49:46 -07:00
parent 5e494d522d
commit cd7da205de

View file

@ -91,7 +91,7 @@ bool SkeletonModel::render(float alpha) {
}
void SkeletonModel::getHandShapes(int jointIndex, QVector<const Shape*>& shapes) const {
if (jointIndex == -1) {
if (jointIndex < 0 || jointIndex >= int(_shapes.size())) {
return;
}
if (jointIndex == getLeftHandJointIndex()