bag-search: ensure button exists before accessing it
This commit is contained in:
+2
-2
@@ -85,8 +85,8 @@ module.enable = function(self)
|
|||||||
if BankFrame:IsVisible() then
|
if BankFrame:IsVisible() then
|
||||||
for i = 1, 28 do
|
for i = 1, 28 do
|
||||||
local button = _G["BankFrameItem"..i]
|
local button = _G["BankFrameItem"..i]
|
||||||
local texture = _G[button:GetName().."IconTexture"]
|
local texture = button and _G[button:GetName().."IconTexture"]
|
||||||
if button then
|
if button and texture then
|
||||||
local link = GetContainerItemLink(-1, i)
|
local link = GetContainerItemLink(-1, i)
|
||||||
button:SetAlpha(.25)
|
button:SetAlpha(.25)
|
||||||
texture:SetDesaturated(1)
|
texture:SetDesaturated(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user