Skip to content

Commit

Permalink
Fixed a bug where an error could happen sometimes when buying items.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed Sep 3, 2024
1 parent 302ce11 commit 6434e33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions views/gridview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ local function ClearButton(ctx, view, slotkey)
local cell = view.itemsByBagAndSlot[slotkey]
if cell then
local section = view:GetSlotSection(slotkey)
section:DislocateAllCellsWithID(slotkey)
section:RemoveCell(slotkey)
if section then
section:DislocateAllCellsWithID(slotkey)
section:RemoveCell(slotkey)
end
view.itemsByBagAndSlot[slotkey]:Wipe(ctx)
view.itemsByBagAndSlot[slotkey] = nil
view:RemoveSlotSection(slotkey)
Expand Down

0 comments on commit 6434e33

Please sign in to comment.