From 2c20b368bc05bd58b5a77825dc2c8083386ad6c4 Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 24 Jan 2017 23:38:21 -0300 Subject: Core/EscortAI: fix invalid iterator dereference --- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index dabd75918d8..369c92d4153 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -339,7 +339,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId) CurrentWP = WaypointList.begin(); m_uiWPWaitTimer = 1; } - else + else if (CurrentWP != WaypointList.end()) { //Make sure that we are still on the right waypoint if (CurrentWP->id != pointId) -- cgit v1.2.3