Skip to content

Commit

Permalink
Fix another memory leak for aura holders and potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Warlockbugs committed Mar 30, 2017
1 parent 029748f commit 0874b08
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,10 @@ void AreaAura::Update(uint32 diff)
holder->SetInUse(false);
}
else
(*tIter)->AddSpellAuraHolder(holder);

if ((*tIter)->AddSpellAuraHolder(holder))
holder->SetState(SPELLAURAHOLDER_STATE_READY);
else
delete holder;
}
}
Aura::Update(diff);
Expand Down

0 comments on commit 0874b08

Please sign in to comment.