chatcopy: skip while chat module is not loaded

This commit is contained in:
shagu
2020-03-03 17:35:01 +01:00
parent b2d9baa71e
commit 5d435a3ad0
+2
View File
@@ -3,6 +3,8 @@ pfUI:RegisterModule("chatcopy", "vanilla:tbc", function ()
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function()
if not pfUI.chat then return end
local button = CreateFrame("Button", "pfChatCopyButton", pfUI.chat.left.panelTop)
button:SetPoint("TOPRIGHT", 0, 0)
button:RegisterForClicks("LeftButtonUp", "RightButtonUp")