From 763977a5d73a9b2ccdd4d11f175882895faee9b6 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 12 Apr 2020 02:03:50 +0200 Subject: [PATCH] thirdparty: check for wim variable before using it --- modules/thirdparty-vanilla.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/thirdparty-vanilla.lua b/modules/thirdparty-vanilla.lua index 213d89cc..daca55a5 100644 --- a/modules/thirdparty-vanilla.lua +++ b/modules/thirdparty-vanilla.lua @@ -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)