diff options
| author | megamage <none@none> | 2009-08-31 00:37:05 -0500 | 
|---|---|---|
| committer | megamage <none@none> | 2009-08-31 00:37:05 -0500 | 
| commit | 7847025bdfd23ed52cca575d56b4aebed89e37eb (patch) | |
| tree | bae5ea895e0d1fb88ef51d9462f9de42c3d294ad /src/game/SpellAuras.cpp | |
| parent | f5d4ee1e9535326993e33c7088804d846494d8f9 (diff) | |
*Temp fix for crash caused by new areaaura without a source. Thanks to Visagalis
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index d8cbb6ba140..7970d8a6e1a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -584,6 +584,12 @@ AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentB      {          //assert(source->isType(TYPEMASK_UNIT));          assert(IS_UNIT_GUID(sourceGuid)); +        if(!parentAura->GetUnitSource()) +        { +            // TODO: there is a crash here when a new aura is added by source aura update, confirmed +            sLog.outCrash("CreateAuraEffect: cannot find source " I64FMT " in world for spell %u", sourceGuid, parentAura->GetId()); +            return NULL; +        }          return new AreaAuraEffect(parentAura, effIndex, currentBasePoints);      }      else if (parentAura->GetSpellProto()->Effect[effIndex] == SPELL_EFFECT_APPLY_AURA)  | 
