From 7847025bdfd23ed52cca575d56b4aebed89e37eb Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 31 Aug 2009 00:37:05 -0500 Subject: *Temp fix for crash caused by new areaaura without a source. Thanks to Visagalis --HG-- branch : trunk --- src/game/SpellAuras.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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) -- cgit v1.2.3