mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 20:44:14 +02:00
avoid unneeded read-lock if action-data was dirty
This commit is contained in:
parent
d504f449e4
commit
08a0bf33a4
1 changed files with 5 additions and 4 deletions
|
@ -1795,12 +1795,13 @@ const QByteArray EntityItem::getActionData() const {
|
|||
EntityItem* unconstThis = const_cast<EntityItem*>(this);
|
||||
unconstThis->withWriteLock([&] {
|
||||
getActionDataInternal();
|
||||
result = _allActionsDataCache;
|
||||
});
|
||||
} else {
|
||||
withReadLock([&] {
|
||||
result = _allActionsDataCache;
|
||||
});
|
||||
}
|
||||
|
||||
withReadLock([&] {
|
||||
result = _allActionsDataCache;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue