From 56d53d8f494e8cc03f9e57f6fbd941c238445826 Mon Sep 17 00:00:00 2001 From: Narcasung Date: Tue, 7 Jul 2026 20:19:06 +0200 Subject: [PATCH] Guard forced Show() to frames already shown naturally by the game --- HideCoA.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/HideCoA.lua b/HideCoA.lua index 6fd8c36..f6cc7a7 100644 --- a/HideCoA.lua +++ b/HideCoA.lua @@ -45,6 +45,7 @@ local function ShouldHideForClass(playerClass, frameName) end local hookedFrames = {} +local seenNaturalShow = {} local function ApplySetting() @@ -59,6 +60,7 @@ local function ApplySetting() if not hookedFrames[frameName] then frame:HookScript("OnShow", function(self) + seenNaturalShow[frameName] = true local _, currentClass = UnitClass("player") if ShouldHideForClass(currentClass, frameName) then self:Hide() @@ -73,7 +75,12 @@ local function ApplySetting() if hide then frame:Hide() - else + elseif seenNaturalShow[frameName] then + -- The server never Show()s a frame the current class doesn't use, + -- so its data (powerType, maxValue, ...) is never populated. Forcing + -- Show() on it exposes that uninitialized state and crashes the + -- server's own OnUpdate handler. Only force-show a frame we've + -- already seen the game display naturally at least once. frame:Show() end