From df21f1f26c79777fc86ad2d6302197bbfa84b1e5 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sun, 25 Oct 2026 12:10:59 -0500 Subject: [PATCH] stable: capture per-iteration button in Enable/Disable closures Lua 5.0 shares the generic-for loop variable across iterations, so the closures all saw the final (nil) value. --- skins/blizzard/stable.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/skins/blizzard/stable.lua b/skins/blizzard/stable.lua index cdaf9e2f..5faed20e 100644 --- a/skins/blizzard/stable.lua +++ b/skins/blizzard/stable.lua @@ -35,13 +35,14 @@ pfUI:RegisterSkin("Pet Stable Master", function () StripTextures(button) SkinButton(button, nil, nil, nil, _G[button:GetName().."IconTexture"]) - button.Enable = function() - button:SetBackdropColor() - button.locked = false + local b = button + b.Enable = function() + b:SetBackdropColor() + b.locked = false end - button.Disable = function() - button:SetBackdropColor(1, .1, .1, .3) - button.locked = true + b.Disable = function() + b:SetBackdropColor(1, .1, .1, .3) + b.locked = true end end