nameplate: only use color if existing

This commit is contained in:
shagu
2016-10-04 19:17:36 +02:00
parent d81b0b4e78
commit 340595b1a4
+1 -1
View File
@@ -164,7 +164,7 @@ pfUI:RegisterModule("nameplates", function ()
-- adjust healthbar color
local red, green, blue, _ = healthbar:GetStatusBarColor()
if pfUI_playerDB[name:GetText()] and pfUI_playerDB[name:GetText()]["class"] then
if pfUI_playerDB[name:GetText()] and pfUI_playerDB[name:GetText()]["class"] and RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]] then
healthbar:SetStatusBarColor(
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].r,
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].g,