Core/Scripts: Fixed crash in Sindragosa

Closes #19227

(cherrypicked from ecfb346d1a)
This commit is contained in:
Keader
2017-03-01 18:58:47 -03:00
committed by Shauren
parent 9e840d05c4
commit f087fbbcc6

View File

@@ -1098,8 +1098,10 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
{
targets.remove_if([](WorldObject* obj) -> bool
{
// SPELL_ATTR3_ONLY_TARGET_PLAYERS present on the spell, we can safely cast to Player
return obj->ToPlayer()->IsGameMaster();
if (Player* target = obj->ToPlayer())
if (target->IsGameMaster())
return true;
return false;
});
_targetCount = targets.size();