From 53b409e756571581769b50a01b5bb69e161d3dc3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 11 May 2011 21:19:22 +0200 Subject: Core/SAI: Fixed memory leak --- src/server/game/AI/SmartScripts/SmartScript.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 13691882459..624e0e40da1 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -742,7 +742,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u CAST_AI(SmartAI, me->AI())->SetFollow((*itr)->ToUnit(), (float)e.action.follow.dist, (float)e.action.follow.angle, e.action.follow.credit, e.action.follow.entry, e.action.follow.creditType); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %u following target %u", me->GetGUIDLow(), (*itr)->GetGUIDLow()); - return; + break; } } @@ -1017,10 +1017,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (IsUnit(*itr)) { me->AI()->AttackStart((*itr)->ToUnit()); - delete targets; - return; + break; } } + delete targets; break; } case SMART_ACTION_SUMMON_CREATURE: -- cgit v1.2.3