thirdparty: check for wim variable before using it

This commit is contained in:
shagu
2020-04-12 02:03:50 +02:00
parent 78afbd179b
commit 763977a5d7
+1 -1
View File
@@ -478,7 +478,7 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function()
if not btn:IsShown() then return end
local btn_txt = btn:GetText()
local user = btn.theUser
local userclr = _G.WIM_PlayerCache[user] and _G.WIM_PlayerCache[user].class and _G.WIM_UserWithClassColor(user)
local userclr = _G.WIM_PlayerCache and _G.WIM_PlayerCache[user] and _G.WIM_PlayerCache[user].class and _G.WIM_UserWithClassColor(user)
if userclr and user ~= userclr then
btn_txt = gsub(btn_txt, user, format("|r%s",userclr))
btn:SetText(btn_txt)