From 9e1827cfbb07eaec63effef6c98fed8c7a96c7bc Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 13 Aug 2025 22:52:50 +0200 Subject: [PATCH] bag-search: ensure button exists before accessing it --- mods/bag-search.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/bag-search.lua b/mods/bag-search.lua index 6c2d099..060dd3e 100644 --- a/mods/bag-search.lua +++ b/mods/bag-search.lua @@ -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)