From 2c7ca8afdd5877635e17442fa48604ab071b59e1 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:25:27 -0500 Subject: [PATCH] Read the dock anchor only once a frame is docked SetupMenu reads each radio's selection when the dropdown is set up at module load, before any frame is docked, so IsDockAnchor indexed a nil dock parent. --- modules/unlock.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/unlock.lua b/modules/unlock.lua index 8335b562..dc1ceeda 100644 --- a/modules/unlock.lua +++ b/modules/unlock.lua @@ -529,8 +529,10 @@ pfUI:RegisterModule("unlock", function () pfUI.unlock.dock.title:SetPoint("TOP", 0, -5) -- anchor + -- SetupMenu reads the selection at once, before any frame is docked local function IsDockAnchor(anchor) - local position = pfUI_config["position"] and pfUI_config["position"][pfUI.unlock.dock.parent.fname] + local drag = pfUI.unlock.dock.parent + local position = drag and pfUI_config["position"] and pfUI_config["position"][drag.fname] return position and position["xpos"] and (position["anchor"] or "TOPLEFT") == anchor end