From 34f857b27dabd103a7656c51b47b985854569372 Mon Sep 17 00:00:00 2001 From: Gabriel Imre Date: Sun, 30 Dec 2018 23:38:04 +0200 Subject: [PATCH] Gracefully consider filterTable nil case --- .../oUF_DebuffHighlight/oUF_DebuffHighlight.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua b/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua index 4281b97..9095918 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua @@ -26,13 +26,15 @@ local function GetDebuffType(unit, filter, filterTable) local name, _, texture, _, debufftype = UnitAura(unit, i, "HARMFUL") if not texture then break end - local filterSpell = filterTable[name] - - if(filterTable and filterSpell and filterSpell.enable) then - return debufftype, texture, true, filterSpell.style, filterSpell.color - elseif(debufftype and (not filter or (filter and dispellist[debufftype]))) then - return debufftype, texture; + if(filterTable) then + local filterSpell = filterTable[name] + if(filterSpell and filterSpell.enable) then + return debufftype, texture, true, filterSpell.style, filterSpell.color + elseif(debufftype and (not filter or (filter and dispellist[debufftype]))) then + return debufftype, texture; + end end + i = i + 1 end end @@ -107,4 +109,4 @@ local function Disable(object) end end -oUF:AddElement("DebuffHighlight", Update, Enable, Disable) \ No newline at end of file +oUF:AddElement("DebuffHighlight", Update, Enable, Disable)