Fix some leaks of groups/raids (#1242)

These cases probably are exceedingly rare, but they still need to be
accounted for. (As in, I don't think anyone has run into these cases too
often to cause problems)
This commit is contained in:
Michael Cook (mackal) authored and GitHub committed 2021-02-12 02:07:58 -06:00
1 parent f9923ffda0
commit 0ef01165ea
3 files changed
+6 -3

No files matched your search

+2
View File
@@ -8605,6 +8605,8 @@ void Bot::ProcessBotGroupInvite(Client* c, std::string botName) {
g->SaveGroupLeaderAA();
database.SetGroupID(c->GetName(), g->GetID(), c->CharacterID());
database.SetGroupID(invitedBot->GetCleanName(), g->GetID(), invitedBot->GetBotID());
} else {
delete g;
}
} else {
AddBotToGroup(invitedBot, c->GetGroup());