diff --git a/src/strategy/actions/InviteToGroupAction.cpp b/src/strategy/actions/InviteToGroupAction.cpp index 0b7b5e8a..8c8bd74b 100644 --- a/src/strategy/actions/InviteToGroupAction.cpp +++ b/src/strategy/actions/InviteToGroupAction.cpp @@ -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))