crash fix 3

This commit is contained in:
Yunfan Li
2023-12-17 10:11:55 +08:00
parent dbbfc4e754
commit 45aadb75ec

View File

@@ -1375,7 +1375,7 @@ PlayerbotAI* PlayerbotsMgr::GetPlayerbotAI(Player* player)
{ {
return nullptr; return nullptr;
} }
if (player->GetSession()->isLogingOut()) { if (player->GetSession()->isLogingOut() || player->IsDuringRemoveFromWorld()) {
return nullptr; return nullptr;
} }
auto itr = _playerbotsMap.find(player->GetGUID()); auto itr = _playerbotsMap.find(player->GetGUID());