Scripted/ScarletMonastery: Fix crash for headless horseman

This commit is contained in:
Vincent_Michael
2013-10-18 12:24:08 +02:00
parent b1bef5b0c6
commit ddada2d182

View File

@@ -580,7 +580,11 @@ public:
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.isEmpty())
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 285);
{
if (Group* group = players.begin()->GetSource()->GetGroup())
if (group->isLFGGroup())
sLFGMgr->FinishDungeon(group->GetGUID(), 285);
}
}
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE