fix(Core/Group): Fix use of a deleted pointer in the group invites list. (#21422)
This commit is contained in:
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
|
||||
_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 (!_player->GetGroup() || sWorld->getBoolConfig(CONFIG_LEAVE_GROUP_ON_LOGOUT))
|
||||
_player->UninviteFromGroup();
|
||||
if (Group *group = _player->GetGroupInvite())
|
||||
sWorld->getBoolConfig(CONFIG_LEAVE_GROUP_ON_LOGOUT)
|
||||
? _player->UninviteFromGroup() // Can disband group.
|
||||
: group->RemoveInvite(_player); // Just removes invite.
|
||||
|
||||
// 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user