Scripts/Commands: Fix a potential crash in cs_account.cpp

This commit is contained in:
Treeston
2020-09-24 22:12:46 +02:00
committed by GitHub
parent a770ad0476
commit 7bf9a0640e

View File

@@ -697,9 +697,10 @@ public:
uint32 playerSecurity;
if (handler->IsConsole())
playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), realmID);
else
playerSecurity = SEC_CONSOLE;
else
playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), realmID);
// can set security level only for target with less security and to less security that we have
// This also restricts setting handler's own security.