From 5a9dfff7cf466f1bc1d7d1813130cbdfe5f5439e Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 30 Aug 2023 15:39:51 +0200 Subject: [PATCH] thirdparty: check for pfUI chat before using it --- modules/thirdparty-vanilla.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/thirdparty-vanilla.lua b/modules/thirdparty-vanilla.lua index 4b71e09f..5746da6d 100644 --- a/modules/thirdparty-vanilla.lua +++ b/modules/thirdparty-vanilla.lua @@ -448,9 +448,12 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function() HookAddonOrVariable("WIM", function() if C.thirdparty.wim.enable == "0" then return end - _G.WIM_isLinkURL = function() return false end - _G.WIM_ConvertURLtoLinks = function(text) -- use pfUI link handler (it is more correct) - return pfUI.chat:HandleLink(text) + -- use pfUI link handler if available + if pfUI.chat then + _G.WIM_isLinkURL = function() return false end + _G.WIM_ConvertURLtoLinks = function(text) + return pfUI.chat:HandleLink(text) + end end -- replace wim class colors with pfUI ones