From 730d4642a5db479c61005371cafe6f02957526bf Mon Sep 17 00:00:00 2001 From: vaisest <4550061+vaisest@users.noreply.github.com> Date: Wed, 5 Aug 2026 19:41:57 +0300 Subject: [PATCH] Fix crash and weird drag behaviour in item DB --- src/Classes/ItemDBControl.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Classes/ItemDBControl.lua b/src/Classes/ItemDBControl.lua index 0995654528..84e8e2f5f6 100644 --- a/src/Classes/ItemDBControl.lua +++ b/src/Classes/ItemDBControl.lua @@ -312,7 +312,7 @@ function ItemDBClass:Draw(viewPort) end function ItemDBClass:GetRowValue(column, index, item) - if column == 1 then + if item and column == 1 then return colorCodes[item.rarity] .. item.name end end @@ -359,6 +359,10 @@ function ItemDBClass:OnSelClick(index, item, doubleClick) self.itemsTab:AddUndoState() self.itemsTab.build.buildFlag = true elseif doubleClick then + -- disallow dragging after double click since the window can jump when + -- the display item tooltip is created, which might cause the drag item + -- to get stuck to the cursor + self.selDragging = false self.itemsTab:CreateDisplayItemFromRaw(item.raw, true) return false end