mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
corrected the lock positions to cover the getJointIndex calls
This commit is contained in:
parent
857a4ab739
commit
72264203db
1 changed files with 2 additions and 2 deletions
|
@ -1750,6 +1750,7 @@ protected:
|
|||
|
||||
template <typename T, typename F>
|
||||
T readLockWithNamedJointIndex(const QString& name, const T& defaultValue, F f) const {
|
||||
QReadLocker readLock(&_jointDataLock);
|
||||
int index = getJointIndex(name);
|
||||
if (index == -1) {
|
||||
index = getFauxJointIndex(name);
|
||||
|
@ -1757,7 +1758,6 @@ protected:
|
|||
if (index == -1) {
|
||||
return defaultValue;
|
||||
}
|
||||
QReadLocker readLock(&_jointDataLock);
|
||||
return f(index);
|
||||
}
|
||||
|
||||
|
@ -1768,6 +1768,7 @@ protected:
|
|||
|
||||
template <typename F>
|
||||
void writeLockWithNamedJointIndex(const QString& name, F f) {
|
||||
QWriteLocker writeLock(&_jointDataLock);
|
||||
int index = getJointIndex(name);
|
||||
if (index == -1) {
|
||||
index = getFauxJointIndex(name);
|
||||
|
@ -1775,7 +1776,6 @@ protected:
|
|||
if (index == -1) {
|
||||
return;
|
||||
}
|
||||
QWriteLocker writeLock(&_jointDataLock);
|
||||
if (_jointData.size() <= index) {
|
||||
_jointData.resize(index + 1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue