Merge pull request #1279 from EQEmu/bug_fix/group_delete

[ASan] Fix heap-use-after-free issue with groups
This commit is contained in:
Alex 2021-03-05 19:20:34 -08:00 committed by GitHub
commit b24ba221e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1006,8 +1006,6 @@ void Group::DisbandGroup(bool joinraid) {
database.ClearGroup(GetID());
}
entity_list.RemoveGroup(GetID());
if(Leader && (Leader->IsLFP()))
{
Leader->UpdateLFP();
@ -1015,6 +1013,7 @@ void Group::DisbandGroup(bool joinraid) {
SetLeader(nullptr);
safe_delete(outapp);
entity_list.RemoveGroup(GetID());
}
void Group::GetMemberList(std::list<Mob*>& member_list, bool clear_list)