Skip to content

Commit

Permalink
Explicitly skip bags with nil invid's
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed Mar 19, 2024
1 parent 3e5f4a0 commit f39f7cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function items:BackpackLoadFunction()
else
local invid = C_Container.ContainerIDToInventoryID(bagid)
local baglink = GetInventoryItemLink("player", invid)
if baglink ~= nil then
if baglink ~= nil and invid~= nil then
local class, subclass = select(6, GetItemInfoInstant(baglink)) --[[@as number]]
name = GetItemSubClassInfo(class, subclass)
extraSlotInfo.emptySlots[name] = extraSlotInfo.emptySlots[name] or 0
Expand Down Expand Up @@ -507,7 +507,7 @@ function items:BankLoadFunction()
else
local invid = C_Container.ContainerIDToInventoryID(bagid)
local baglink = GetInventoryItemLink("player", invid)
if baglink ~= nil then
if baglink ~= nil and invid ~= nil then
local class, subclass = select(6, GetItemInfoInstant(baglink)) --[[@as number]]
name = GetItemSubClassInfo(class, subclass)
extraSlotInfo.emptySlots[name] = extraSlotInfo.emptySlots[name] or 0
Expand Down

0 comments on commit f39f7cb

Please sign in to comment.