check for faux joints before heading into code that needs to lock

This commit is contained in:
Seth Alves 2017-07-06 18:00:11 -07:00
parent a543b957ef
commit ab8d9f4885

View file

@ -1021,11 +1021,13 @@ void Avatar::cacheJoints() const {
}
int Avatar::getJointIndex(const QString& name) const {
int result = getFauxJointIndex(name);
if (result != -1) {
return result;
}
auto getJointIndexWorker = [&]() {
int result = getFauxJointIndex(name);
if (result != -1) {
return result;
} else if (_jointIndicesCache.contains(name)) {
if (_jointIndicesCache.contains(name)) {
return _jointIndicesCache[name];
} else {
return -1;