fix(Core/ObjectMgr): Potential crash in GetModuleString() (#21211)
This commit is contained in:
parent
5bc512f75c
commit
9c43adc445
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue