[Crash] Fix dangling pointer crash observed in SendHPPacketsFrom (#3611)

* [Crash] Fix dangling pointer crash observed in SendHPPacketsFrom

* Update bot.cpp
This commit is contained in:
Chris Miles 2023-10-07 14:00:19 -05:00 committed by GitHub
parent efb03164c7
commit d8926cd5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -465,6 +465,14 @@ Bot::~Bot() {
}
entity_list.RemoveBot(GetID());
if (GetGroup()) {
GetGroup()->DelMember(this);
}
if (GetRaid()) {
GetRaid()->RemoveMember(GetName());
}
}
void Bot::SetBotID(uint32 botID) {