diff options
| author | QAston <none@none> | 2009-03-22 16:53:56 +0100 |
|---|---|---|
| committer | QAston <none@none> | 2009-03-22 16:53:56 +0100 |
| commit | df553a98dd221b212189769627ce28f27a662aca (patch) | |
| tree | 55b4053f2d7db5ecc94b4ba0f23218ab4e9d61c1 /src/game/Spell.cpp | |
| parent | a0530658ff452996cc56126d972f97b9a515559d (diff) | |
*Fix a crash in latest rev.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
| -rw-r--r-- | src/game/Spell.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index ea0aaeebd35..dc5dbe6b4ea 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1196,7 +1196,10 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) if (GetSpellDuration(i->first)==-1) // get duration from aura-only once if (!_duration) - _duration = unit->GetAuraByCasterSpell(m_spellInfo->Id, m_caster->GetGUID())->GetAuraDuration(); + { + Aura * aur = unit->GetAuraByCasterSpell(m_spellInfo->Id, m_caster->GetGUID()); + _duration = aur ? aur->GetAuraDuration() : -1; + } unit->SetAurasDurationByCasterSpell(i->first->Id, m_caster->GetGUID(), _duration); } } |
