fix crash issue

This commit is contained in:
Yunfan Li
2023-08-24 23:29:23 +08:00
parent 0d851002f2
commit 5d05db4673

View File

@@ -1132,7 +1132,7 @@ void PlayerbotMgr::HandleMasterOutgoingPacket(WorldPacket const& packet)
{ {
Player* const bot = it->second; Player* const bot = it->second;
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
if (botAI->GetMaster() == GetMaster()) if (botAI && botAI->GetMaster() == GetMaster())
botAI->HandleMasterOutgoingPacket(packet); botAI->HandleMasterOutgoingPacket(packet);
} }
} }