mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/DataStores: Fixed creating entries in sEmotesTextSoundMap if passed invalid arguments (also a data race, if done in multiple threads)
This commit is contained in:
@@ -1361,5 +1361,6 @@ ResponseCodes ValidateName(std::string const& name, LocaleConstant locale)
|
||||
|
||||
EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender)
|
||||
{
|
||||
return sEmotesTextSoundMap[EmotesTextSoundKey(emote, race, gender)];
|
||||
auto itr = sEmotesTextSoundMap.find(EmotesTextSoundKey(emote, race, gender));
|
||||
return itr != sEmotesTextSoundMap.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user