From 5d435a3ad0ec8f3b28e4ef7606aa9ac1b4023664 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 3 Mar 2020 17:35:01 +0100 Subject: [PATCH] chatcopy: skip while chat module is not loaded --- modules/chatcopy.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/chatcopy.lua b/modules/chatcopy.lua index 01a18244..98560584 100644 --- a/modules/chatcopy.lua +++ b/modules/chatcopy.lua @@ -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")