From 319bd0593099ac41dd2f9e840e7f9cbf61b9e464 Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Mon, 8 Jun 2026 20:42:10 +0200 Subject: [PATCH] fix(necromancer): ship bar layout in defaults so existing profiles don't crash The necromancerBar height/order/background only reached a profile via the defaultlayout merge, which runs on profile reset. Enabling the bar on a pre-existing profile left height nil, crashing Layout:PositionWidgets ("attempt to compare number with nil" at layout.lua:441). Carry the layout in the AceDB defaults so it resolves via the defaults metatable for old and new profiles alike. --- ShadowedUnitFrames/ShadowedUnitFrames.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ShadowedUnitFrames/ShadowedUnitFrames.lua b/ShadowedUnitFrames/ShadowedUnitFrames.lua index c7878a0..7fb1109 100644 --- a/ShadowedUnitFrames/ShadowedUnitFrames.lua +++ b/ShadowedUnitFrames/ShadowedUnitFrames.lua @@ -243,7 +243,11 @@ function ShadowUF:LoadUnitDefaults() self.defaults.profile.units.player.runeBar = {enabled = false} self.defaults.profile.units.player.totemBar = {enabled = false} self.defaults.profile.units.player.druidBar = {enabled = false} - self.defaults.profile.units.player.necromancerBar = {enabled = false} + -- Carry the layout (height/order/background) in the defaults, not only in the + -- defaultlayout merge: that merge only runs on profile reset, so a bar added to + -- an existing profile would otherwise have a nil height and crash + -- Layout:PositionWidgets ("attempt to compare number with nil" in layout.lua). + self.defaults.profile.units.player.necromancerBar = {enabled = false, height = 0.40, order = 26, background = true} self.defaults.profile.units.player.xpBar = {enabled = false} self.defaults.profile.units.player.fader = {enabled = false, combatAlpha = 1.0, inactiveAlpha = 0.60} self.defaults.profile.units.player.indicators.lfdRole = {enabled = true, size = 0, x = 0, y = 0}