Better way to fix crash in Chromagus script. by hyriuu. Closes #650

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-12-06 20:25:36 +01:00
parent e864ec0e40
commit c91974cc34
@@ -229,7 +229,8 @@ struct TRINITY_DLL_DECL boss_chromaggusAI : public ScriptedAI
//Affliction_Timer
if (Affliction_Timer <= diff)
{
for (std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); i != m_creature->getThreatManager().getThreatList().end(); ++i)
std::list<HostilReference*> threatlist = m_creature->getThreatManager().getThreatList();
for (std::list<HostilReference*>::iterator i = threatlist.begin(); i != threatlist.end(); ++i)
{
Unit* pUnit;
if ((*i) && (*i)->getSource())