From d290ddd26dddbd6bd35b56aa044c506450ca7023 Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 20 Sep 2017 23:20:25 +0200 Subject: [PATCH] unitframes: use default color on empty class --- api/unitframes.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 36411b35..28f5e561 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1417,9 +1417,9 @@ function pfUI.uf.GetColor(self, preset) elseif preset == "class" and config["classcolor"] == "1" then local _, class = UnitClass(unitstr) - r = RAID_CLASS_COLORS[class].r - g = RAID_CLASS_COLORS[class].g - b = RAID_CLASS_COLORS[class].b + if RAID_CLASS_COLORS[class] then + r, g, b = RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b + end elseif preset == "reaction" and config["classcolor"] == "1" then r = UnitReactionColor[UnitReaction(unitstr, "player")].r