mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-24 04:51:30 +00:00
[Crash] Add validation to RemoveXTarget (#4324)
This commit is contained in:
parent
fc9ef2fb7b
commit
98b137154a
@ -6994,6 +6994,10 @@ void Client::AddAutoXTarget(Mob *m, bool send)
|
|||||||
|
|
||||||
void Client::RemoveXTarget(Mob *m, bool OnlyAutoSlots)
|
void Client::RemoveXTarget(Mob *m, bool OnlyAutoSlots)
|
||||||
{
|
{
|
||||||
|
if (!XTargettingAvailable() || !m || !m_activeautohatermgr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_activeautohatermgr->decrement_count(m);
|
m_activeautohatermgr->decrement_count(m);
|
||||||
// now we may need to clean up our CurrentTargetNPC entries
|
// now we may need to clean up our CurrentTargetNPC entries
|
||||||
for (int i = 0; i < GetMaxXTargets(); ++i) {
|
for (int i = 0; i < GetMaxXTargets(); ++i) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user