From fefb3930fbdcd117bed3950b2cab8bffcc4fb21c Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 20 Mar 2020 08:54:14 +0100 Subject: [PATCH] addonbuttons: skip invalid button frames --- modules/addonbuttons.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/addonbuttons.lua b/modules/addonbuttons.lua index 40930172..ca003a27 100644 --- a/modules/addonbuttons.lua +++ b/modules/addonbuttons.lua @@ -221,6 +221,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function () end local function BackupButton(frame) + if not frame then return end if frame.backup == nil then frame.backup = {} frame.backup.top_frame_name = GetTopFrame(frame):GetName() @@ -273,6 +274,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function () end local function MoveButton(index, frame) + if not frame then return end local top_frame, row_index, offsetX, offsetY, final_scale top_frame = GetTopFrame(frame) final_scale = GetScale() / pfUI.addonbuttons.effective_scale