diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-02-12 12:18:17 +0100 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2016-02-12 12:18:17 +0100 |
commit | a23ccc1b83ded39501d690e288be49be8f32b539 (patch) | |
tree | 1a46e184ec28bbc3c414122486a7dd8b65780bb8 /src | |
parent | 9f6a7c7526b10b4cd7da21cc76643319d87ba0f3 (diff) |
Scripts/Naxxramas: Fix an edge case crash in Gothik. Closes #16575.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 81f1e071da0..be12894ebea 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -375,8 +375,12 @@ class boss_gothik : public CreatureScript _gateIsOpen = true; for (ObjectGuid summonGuid : summons) + { if (Creature* summon = ObjectAccessor::GetCreature(*me, summonGuid)) summon->AI()->DoAction(ACTION_GATE_OPENED); + if (summons.empty()) // ACTION_GATE_OPENED may cause an evade, despawning summons and invalidating our iterator + break; + } } void DamageTaken(Unit* /*who*/, uint32& damage) override |