From 6bfd09d0d646307e9629c46580287768777ae23b Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 20 Sep 2020 20:09:29 +0200 Subject: [PATCH] cooldown: use cached parent variable --- modules/cooldown.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cooldown.lua b/modules/cooldown.lua index 27802f89..bda11302 100644 --- a/modules/cooldown.lua +++ b/modules/cooldown.lua @@ -12,8 +12,8 @@ pfUI:RegisterModule("cooldown", "vanilla:tbc", function () if not parent then this:Hide() end -- avoid to set cooldowns on invalid frames - if this:GetParent() and this:GetParent():GetName() and _G[this:GetParent():GetName() .. "Cooldown"] then - if not _G[this:GetParent():GetName() .. "Cooldown"]:IsShown() then + if parent and parent:GetName() and _G[parent:GetName() .. "Cooldown"] then + if not _G[parent:GetName() .. "Cooldown"]:IsShown() then this:Hide() end end