addonbuttons: treat orphaned frames as top frames

This commit is contained in:
shagu
2020-03-20 11:56:41 +01:00
parent fefb3930fb
commit 33e1d4d33d
+2 -2
View File
@@ -213,7 +213,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function ()
end
local function GetTopFrame(frame)
if frame:GetParent() == Minimap or frame:GetParent() == UIParent then
if frame:GetParent() == Minimap or frame:GetParent() == UIParent or not frame:GetParent() then
return frame
else
return GetTopFrame(frame:GetParent())
@@ -385,7 +385,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function ()
function pfUI.addonbuttons:ProcessButtons()
UpdatePanel()
for i, button_name in ipairs(pfUI.addonbuttons.buttons) do
if _G[button_name] ~= nil then
if _G[button_name] then
BackupButton(_G[button_name])
MoveButton(i, _G[button_name])
end