From 4c7a318de6deb6b5caf6f805b98ef612b7a4fd26 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Thu, 26 Mar 2026 09:39:21 -0500 Subject: [PATCH] Fix: Guard nil checks for iconData.Name and tip.title in MapIconTooltip --- Modules/Tooltips/MapIconTooltip.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Modules/Tooltips/MapIconTooltip.lua b/Modules/Tooltips/MapIconTooltip.lua index 339854a..41b9a33 100644 --- a/Modules/Tooltips/MapIconTooltip.lua +++ b/Modules/Tooltips/MapIconTooltip.lua @@ -193,15 +193,23 @@ function MapIconTooltip:Show() if not npcAndObjectOrder["default"] then npcAndObjectOrder["default"] = {npcNames = {}, quests = {}}; end - npcAndObjectOrder["default"].npcNames[iconData.Name] = true - npcAndObjectOrder["default"].quests[tip.title] = tip + if iconData.Name then + npcAndObjectOrder["default"].npcNames[iconData.Name] = true + end + if tip and tip.title then + npcAndObjectOrder["default"].quests[tip.title] = tip + end elseif iconData.Type == "monster" or iconData.Type == "killcredit" or iconData.Type == "spell" or iconData.Type == "object" or iconData.Type == "event" or iconData.Type == "item" then local tip = _MapIconTooltip:GetAvailableOrCompleteTooltip(icon) if not npcAndObjectOrder["default"] then npcAndObjectOrder["default"] = {npcNames = {}, quests = {}}; end - npcAndObjectOrder["default"].npcNames[iconData.Name] = true - npcAndObjectOrder["default"].quests[tip.title] = tip + if iconData.Name then + npcAndObjectOrder["default"].npcNames[iconData.Name] = true + end + if tip and tip.title then + npcAndObjectOrder["default"].quests[tip.title] = tip + end elseif iconData.CustomTooltipData then manualOrder[iconData.CustomTooltipData.Title] = { Body = { iconData.CustomTooltipData.Body or "" } } elseif iconData.ManualTooltipData then