mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
Fix locking
This commit is contained in:
parent
4834c002da
commit
38738a69ac
1 changed files with 6 additions and 4 deletions
|
@ -3047,11 +3047,13 @@ void AvatarData::clearAvatarEntity(const QUuid& entityID, bool requiresRemovalFr
|
|||
}
|
||||
|
||||
void AvatarData::clearAvatarEntities() {
|
||||
_avatarEntitiesLock.withReadLock([this] {
|
||||
foreach(auto entityID, _packedAvatarEntityData.keys()) {
|
||||
clearAvatarEntity(entityID);
|
||||
}
|
||||
QList<QUuid> avatarEntityIDs;
|
||||
_avatarEntitiesLock.withReadLock([&] {
|
||||
avatarEntityIDs = _packedAvatarEntityData.keys();
|
||||
});
|
||||
for (const auto& entityID : avatarEntityIDs) {
|
||||
clearAvatarEntity(entityID);
|
||||
}
|
||||
}
|
||||
|
||||
AvatarEntityMap AvatarData::getAvatarEntityData() const {
|
||||
|
|
Loading…
Reference in a new issue