bag-search: ensure button exists before accessing it

This commit is contained in:
shagu
2025-08-13 22:52:50 +02:00
parent 05281f5270
commit 9e1827cfbb
+2 -2
View File
@@ -85,8 +85,8 @@ module.enable = function(self)
if BankFrame:IsVisible() then
for i = 1, 28 do
local button = _G["BankFrameItem"..i]
local texture = _G[button:GetName().."IconTexture"]
if button then
local texture = button and _G[button:GetName().."IconTexture"]
if button and texture then
local link = GetContainerItemLink(-1, i)
button:SetAlpha(.25)
texture:SetDesaturated(1)