From 29644465332feecff3df51c0a0527b513551f759 Mon Sep 17 00:00:00 2001 From: Alvin Zhu Date: Tue, 31 Jan 2023 18:44:13 +0800 Subject: [PATCH] fix crash --- src/PlayerbotMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlayerbotMgr.cpp b/src/PlayerbotMgr.cpp index 8e3a8a94..a155d0fc 100644 --- a/src/PlayerbotMgr.cpp +++ b/src/PlayerbotMgr.cpp @@ -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; }