fix(Core/Group): Fix use of a deleted pointer in the group invites list. (#21422)
This commit is contained in:
committed by
GitHub
parent
c92d50d6ec
commit
3baa00ae06
@@ -667,9 +667,10 @@ void WorldSession::LogoutPlayer(bool save)
|
|||||||
// there are some positive auras from boss encounters that can be kept by logging out and logging in after boss is dead, and may be used on next bosses
|
// there are some positive auras from boss encounters that can be kept by logging out and logging in after boss is dead, and may be used on next bosses
|
||||||
_player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP);
|
_player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP);
|
||||||
|
|
||||||
///- If the player is in a group and LeaveGroupOnLogout is enabled or if the player is invited to a group, remove him. If the group is then only 1 person, disband the group.
|
if (Group *group = _player->GetGroupInvite())
|
||||||
if (!_player->GetGroup() || sWorld->getBoolConfig(CONFIG_LEAVE_GROUP_ON_LOGOUT))
|
sWorld->getBoolConfig(CONFIG_LEAVE_GROUP_ON_LOGOUT)
|
||||||
_player->UninviteFromGroup();
|
? _player->UninviteFromGroup() // Can disband group.
|
||||||
|
: group->RemoveInvite(_player); // Just removes invite.
|
||||||
|
|
||||||
// remove player from the group if he is:
|
// remove player from the group if he is:
|
||||||
// a) in group; b) not in raid group; c) logging out normally (not being kicked or disconnected) d) LeaveGroupOnLogout is enabled
|
// a) in group; b) not in raid group; c) logging out normally (not being kicked or disconnected) d) LeaveGroupOnLogout is enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user