mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 00:06:36 +00:00
Added a few checks to resolve dangling pointers involving Mercs. Similar to the AIYellForHelp crash fixed years ago by Rogean.
This commit is contained in:
+2
-1
@@ -4915,9 +4915,10 @@ void Merc::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_sk
|
||||
if(entity_list.GetCorpseByID(GetID()))
|
||||
entity_list.GetCorpseByID(GetID())->Depop();
|
||||
|
||||
entity_list.RemoveMerc(GetID());
|
||||
|
||||
if(Suspend())
|
||||
{
|
||||
//todo: perl event?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user