mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
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:
parent
f9923ffda0
commit
0ef01165ea
@ -8605,6 +8605,8 @@ void Bot::ProcessBotGroupInvite(Client* c, std::string botName) {
|
|||||||
g->SaveGroupLeaderAA();
|
g->SaveGroupLeaderAA();
|
||||||
database.SetGroupID(c->GetName(), g->GetID(), c->CharacterID());
|
database.SetGroupID(c->GetName(), g->GetID(), c->CharacterID());
|
||||||
database.SetGroupID(invitedBot->GetCleanName(), g->GetID(), invitedBot->GetBotID());
|
database.SetGroupID(invitedBot->GetCleanName(), g->GetID(), invitedBot->GetBotID());
|
||||||
|
} else {
|
||||||
|
delete g;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
AddBotToGroup(invitedBot, c->GetGroup());
|
AddBotToGroup(invitedBot, c->GetGroup());
|
||||||
|
|||||||
@ -561,8 +561,9 @@ void Client::CompleteConnect()
|
|||||||
entity_list.AddRaid(raid, raidid);
|
entity_list.AddRaid(raid, raidid);
|
||||||
raid->LoadLeadership(); // Recreating raid in new zone, get leadership from DB
|
raid->LoadLeadership(); // Recreating raid in new zone, get leadership from DB
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
raid = nullptr;
|
safe_delete(raid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (raid) {
|
if (raid) {
|
||||||
SetRaidGrouped(true);
|
SetRaidGrouped(true);
|
||||||
|
|||||||
@ -1016,7 +1016,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
if (group->GetID() != 0)
|
if (group->GetID() != 0)
|
||||||
entity_list.AddGroup(group, groupid);
|
entity_list.AddGroup(group, groupid);
|
||||||
else
|
else
|
||||||
group = nullptr;
|
safe_delete(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group)
|
if (group)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user