Verify that a spell has associated SpellInfo before using it.
Johnny C. Lam [12-05-13 - 08:19]
Verify that a spell has associated SpellInfo before using it.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1236 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleAura.lua b/OvaleAura.lua
index efbdb45..95ba2a5 100644
--- a/OvaleAura.lua
+++ b/OvaleAura.lua
@@ -748,7 +748,10 @@ statePrototype.ApplySpellAuras = function(state, spellId, guid, startCast, endCa
if spellData == "refresh" then
Ovale:Logf("Aura %d is refreshed.", auraId)
else -- if stacks > 0 then
- local maxstacks = si.maxstacks or 1
+ local maxstacks = 1
+ if si and si.maxstacks then
+ maxstacks = si.maxstacks
+ end
aura.stacks = aura.stacks + stacks
if aura.stacks > maxstacks then
aura.stacks = maxstacks