From f13b84565fc2759acc983bacbe6abda3130b83c3 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 10 Mar 2019 15:06:46 +0100 Subject: [PATCH] bags: skip invalid bagslots --- modules/bags.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bags.lua b/modules/bags.lua index f805903c..9bb7a3be 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -98,7 +98,7 @@ pfUI:RegisterModule("bags", function () local bagsize = GetContainerNumSlots(bag) if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end for slot=1, bagsize do - if pfUI.bags[bag].slots[slot].frame:IsShown() then + if pfUI.bags[bag] and pfUI.bags[bag].slots[slot] and pfUI.bags[bag].slots[slot].frame:IsShown() then local _, _, locked, _ = GetContainerItemInfo(bag, slot) SetItemButtonDesaturated(pfUI.bags[bag].slots[slot].frame, locked, 0.5, 0.5, 0.5) end