mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Fix crash when getting MyAvatar.sessionUUID from AvatarManager
The previous code inadvertently added a default constructed shared pointer to the avatar hash, causing it to crash when dereferencing it in the update loop.
This commit is contained in:
parent
111a8caa3c
commit
00b47cacea
1 changed files with 2 additions and 2 deletions
|
@ -310,8 +310,8 @@ QVector<QUuid> AvatarManager::getAvatarIdentifiers() {
|
|||
}
|
||||
|
||||
AvatarData* AvatarManager::getAvatar(QUuid avatarID) {
|
||||
QReadLocker locker(&_hashLock);
|
||||
return _avatarHash[avatarID].get(); // Non-obvious: A bogus avatarID answers your own avatar.
|
||||
// Null/Default-constructed QUuids will return MyAvatar
|
||||
return getAvatarBySessionID(avatarID).get();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue