fix crash

This commit is contained in:
Alvin Zhu
2023-01-31 18:44:13 +08:00
parent 123ec85b86
commit 2964446533

View File

@@ -1128,7 +1128,7 @@ PlayerbotAI* PlayerbotsMgr::GetPlayerbotAI(Player* player)
PlayerbotMgr* PlayerbotsMgr::GetPlayerbotMgr(Player* player)
{
if (!player || (!player->IsInWorld() && !player->IsBeingTeleported()))
if (!(sPlayerbotAIConfig->enabled) || !player || (!player->IsInWorld() && !player->IsBeingTeleported()))
{
return nullptr;
}