Fixed issue with power tag when unit is nil
p3lim-52096 [04-09-09 - 18:50]
Fixed issue with power tag when unit is nil
git-svn-id: svn://svn.wowinterface.com/oUF_P3lim-52/trunk@69 8c7459ed-49dc-4bc8-85d7-b6381a8f5413
diff --git a/oUF_P3lim/oUF_P3lim.lua b/oUF_P3lim/oUF_P3lim.lua
index 13a1a0b..b02edae 100644
--- a/oUF_P3lim/oUF_P3lim.lua
+++ b/oUF_P3lim/oUF_P3lim.lua
@@ -70,7 +70,7 @@ oUF.TagEvents['[custompp]'] = oUF.TagEvents['[curpp]']
oUF.Tags['[custompp]'] = function(unit)
local num, str = UnitPowerType(unit)
local c = colors.power[str]
- return format('|cff%02x%02x%02x%s|r', c[1] * 255, c[2] * 255, c[3] * 255, oUF.Tags['[curpp]'](unit))
+ return c and format('|cff%02x%02x%02x%s|r', c[1] * 255, c[2] * 255, c[3] * 255, oUF.Tags['[curpp]'](unit))
end
oUF.TagEvents['[customname]'] = 'UNIT_NAME_UPDATE UNIT_REACTION UNIT_FACTION'