From d48909b5d62986b685368254eed9e886cc0266ec Mon Sep 17 00:00:00 2001 From: Keader Date: Tue, 9 Jun 2020 09:52:44 -0300 Subject: Scripts/ShadowfangKeep: Fixed a crash in spellscript (cherry picked from commit be48fbc32ac49673ce2415b76cb447a61585ed01) --- .../scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index 1d8ae218f3a..b218f8a116c 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -414,6 +414,9 @@ class spell_apothecary_lingering_fumes : public SpellScriptLoader std::list triggers; caster->GetCreatureListWithEntryInGrid(triggers, NPC_VIAL_BUNNY, 100.0f); + if (triggers.empty()) + return; + Creature* trigger = Trinity::Containers::SelectRandomContainerElement(triggers); caster->GetMotionMaster()->MovePoint(0, trigger->GetPosition()); -- cgit v1.2.3