From 26dd06cf9d245104ba75ffec6c3f32a16b71de42 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Tue, 7 Apr 2026 17:46:06 -0500 Subject: [PATCH] Fix critical LUA crash in QuestLinks due to nil concatenation and invalid chat link matching --- CHANGELOG.md | 7 +++++++ Modules/QuestLinks/ChatFilter.lua | 5 +++-- Modules/QuestLinks/Link.lua | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 108ec25..1621aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## v1.5.8 (2026-04-07) + +### Bug Fixes + +- **[Fix — QuestLink Crash]** Resolved a critical LUA error in `Link.lua`: `attempt to concatenate local 'coloredQuestName' (a nil value)`. This was caused by the `ChatFilter` misidentifying non-quest bracketed patterns (like Keystone links `[Name (ID)]`) as quests. Added a defensive nil guard in `GetQuestHyperLink` and hardened the `ChatFilter` to verify quest names exist before attempting string replacement. + + ## Questie-X - Expanded Font Selection ### New Features diff --git a/Modules/QuestLinks/ChatFilter.lua b/Modules/QuestLinks/ChatFilter.lua index b873160..889d416 100644 --- a/Modules/QuestLinks/ChatFilter.lua +++ b/Modules/QuestLinks/ChatFilter.lua @@ -39,8 +39,9 @@ ChatFilter.Filter = function(chatFrame, _, msg, playerName, languageName, channe local questLink = QuestieLink:GetQuestHyperLink(questId, senderGUID) - -- Escape the magic characters - local function escapeMagic(toEsc) + if questLink then + -- Escape the magic characters + local function escapeMagic(toEsc) return (toEsc :gsub("%%", "%%%%") :gsub("^%^", "%%^") diff --git a/Modules/QuestLinks/Link.lua b/Modules/QuestLinks/Link.lua index 6af8e28..9c5945b 100644 --- a/Modules/QuestLinks/Link.lua +++ b/Modules/QuestLinks/Link.lua @@ -83,6 +83,11 @@ end ---@return string function QuestieLink:GetQuestHyperLink(questId, senderGUID) local coloredQuestName = QuestieLib:GetColoredQuestName(questId, Questie.db.profile.trackerShowQuestLevel, true, false) + + if not coloredQuestName then + return nil + end + local questLevel, _ = QuestieLib.GetTbcLevel(questId) local isRepeatable = QuestieDB.IsRepeatable(questId)