From 6e88a5a0d4dadd9f9625ce81884df2dd4be9be8b Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Thu, 5 Dec 2013 08:19:09 +0000 Subject: [PATCH] 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 --- OvaleAura.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.7.9.5