From 1ad4c1e2a635efe0c189fac5850dab9c4ced4151 Mon Sep 17 00:00:00 2001 From: roby-brok Date: Fri, 14 Aug 2026 10:09:35 +0100 Subject: [PATCH] Tooltip: don't crash on tooltips longer than 30 lines AddSourceLine's line buffer is pre-built for exactly 30 entries, so any item tooltip that exceeds that dies with Core\Tooltip.lua:56: attempt to index field '?' (a nil value) on every hover, and the source line is never added. Easy to hit on servers with long set lists in the tooltip plus a tooltip-extending addon (StatCompare and friends) -- a 6-piece set block alone adds ~10 lines. Grow the buffer on demand instead; the clear/rebuild loops already iterate whatever size the table has. --- Core/Tooltip.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/Tooltip.lua b/Core/Tooltip.lua index 2b283a9..2a18c90 100644 --- a/Core/Tooltip.lua +++ b/Core/Tooltip.lua @@ -47,6 +47,9 @@ local function AddSourceLine(tooltip, sourceStr) end for i = 1, numLines do + -- the buffer is pre-built for 30 lines, but long set tooltips plus + -- tooltip-extending addons (StatCompare etc.) can exceed that + lines[i] = lines[i] or {} left = _G[name.."TextLeft"..i] right = _G[name.."TextRight"..i] leftText = left:GetText()