Update ChatAvatarService.cpp

This commit is contained in:
John
2021-10-03 08:52:45 -04:00
committed by GitHub
parent c632be49e2
commit fe0e00c505

View File

@@ -72,6 +72,8 @@ void ChatAvatarService::LoginAvatar(ChatAvatar* avatar) {
}
void ChatAvatarService::LogoutAvatar(ChatAvatar* avatar) {
if(avatar->isOnline_) // bug fix for redundant logout checks that cause crashes
{
avatar->isOnline_ = false;
onlineAvatars_.erase(std::remove_if(
@@ -79,6 +81,7 @@ void ChatAvatarService::LogoutAvatar(ChatAvatar* avatar) {
return onlineAvatar->GetAvatarId() == avatar->GetAvatarId();
}));
}
}
void ChatAvatarService::PersistAvatar(const ChatAvatar* avatar) { UpdateAvatar(avatar); }