From 2774d8e7618333f48c1f6c625b9a80919bb4a390 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 11 Feb 2015 21:56:58 -0800 Subject: [PATCH] AddToHateList will no longer assert on other = nullptr, it will now just do nothing. Since the function can be called from perl/lua it's inapprops to let them just crash the server with an abort() from assert. --- zone/attack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index b98fa1c3e..814a474e8 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2404,8 +2404,8 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, bool iYellForHelp /*= true*/, bool bFrenzy /*= false*/, bool iBuffTic /*= false*/) { - - assert(other != nullptr); + if(!other) + return; if (other == this) return;