mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
fix(Core/ObjectMgr): Potential crash in GetModuleString() (#21211)
This commit is contained in:
@@ -8688,7 +8688,7 @@ bool ObjectMgr::LoadModuleStringsLocale()
|
||||
std::string const* ObjectMgr::GetModuleString(std::string module, uint32 id, LocaleConstant locale) const
|
||||
{
|
||||
ModuleString const* ms = GetModuleString(module, id);
|
||||
if (ms->Content.size())
|
||||
if (ms && !ms->Content.empty())
|
||||
{
|
||||
if (ms->Content.size() > size_t(locale) && !ms->Content[locale].empty())
|
||||
return &ms->Content[locale];
|
||||
|
||||
Reference in New Issue
Block a user