[Crash fix] Fix a possible crash

This commit is contained in:
Yunfan Li
2024-07-19 13:43:30 +08:00
parent fce0f431e1
commit 2f93eeedc9

View File

@@ -19,7 +19,7 @@ bool InviteToGroupAction::Execute(Event event)
bool InviteToGroupAction::Invite(Player* player)
{
if (!player)
if (!player || !player->IsInWorld())
return false;
if (!GET_PLAYERBOT_AI(player) && !botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_INVITE, true, player))