mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix crash in GetPlayerbotMgr
This commit is contained in:
parent
31509aac68
commit
0033ae9968
@ -1052,7 +1052,7 @@ void PlayerbotsMgr::RemovePlayerBotData(ObjectGuid const& guid)
|
|||||||
|
|
||||||
PlayerbotAI* PlayerbotsMgr::GetPlayerbotAI(Player* player)
|
PlayerbotAI* PlayerbotsMgr::GetPlayerbotAI(Player* player)
|
||||||
{
|
{
|
||||||
if (!player)
|
if (!player || !player->IsInWorld())
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -1068,7 +1068,7 @@ PlayerbotAI* PlayerbotsMgr::GetPlayerbotAI(Player* player)
|
|||||||
|
|
||||||
PlayerbotMgr* PlayerbotsMgr::GetPlayerbotMgr(Player* player)
|
PlayerbotMgr* PlayerbotsMgr::GetPlayerbotMgr(Player* player)
|
||||||
{
|
{
|
||||||
if (!player)
|
if (!player || !player->IsInWorld())
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user