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:
1 parent
29fc5909e6
commit
0fbcff44df
1 file changed
+2
-1
@@ -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