Skip to content

Commit e8d62e1

Browse files
committed
fix: prevent memory leaks generating UI descriptions
Closes coder/balatrollm#29 .
1 parent df636d7 commit e8d62e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lua/utils.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@ end
707707
---@return string description The description text from UI
708708
function utils.get_card_ui_description(card)
709709
-- Generate the UI structure (same as hover tooltip)
710-
local ui_table = card:generate_UIBox_ability_table()
710+
card:hover()
711+
card:stop_hover()
712+
local ui_table = card.ability_UIBox_table
711713
if not ui_table then
712714
return ""
713715
end

0 commit comments

Comments
 (0)