I can't test it atm..but, you could try this as a fix:
Code:
zone/mob_ai.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp
index 79c4493..33df4e6 100644
--- a/zone/mob_ai.cpp
+++ b/zone/mob_ai.cpp
@@ -1031,6 +1031,9 @@ void Mob::AI_Process() {
}
}
+ if (target && !hate_list.IsEntOnHateList(target))
+ target = nullptr;
+
if (!target)
return;
EDIT: That's just above where you posted from
It's possible for the ai target timer to not be ready in the 'else' clause from above and the code will flow through with the last target..
..which, if already destroyed, will cause an exception error when you try to dereference the pointer - testing for target->IsCorpse()