From 1e5da24529b46283dccd1d643f30e663de59562a Mon Sep 17 00:00:00 2001 From: Xurkon Date: Thu, 2 Apr 2026 20:59:50 -0500 Subject: [PATCH] fix: Guard against nil IdList in killcredit objective --- Modules/Quest/QuestieQuestPrivates.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Modules/Quest/QuestieQuestPrivates.lua b/Modules/Quest/QuestieQuestPrivates.lua index 183b6f8..06e24ba 100644 --- a/Modules/Quest/QuestieQuestPrivates.lua +++ b/Modules/Quest/QuestieQuestPrivates.lua @@ -68,13 +68,15 @@ killcredit = function(npcId, objective, objectiveData) local foundValid = false -- First pass: try all IDs in IdList - for npcIdIndex = 1, #objectiveData.IdList do - local killCreditNpcId = objectiveData.IdList[npcIdIndex] - if killCreditNpcId and killCreditNpcId > 0 then - local monsterResult = monster(killCreditNpcId, objective) - if monsterResult then - ret[killCreditNpcId] = monsterResult[killCreditNpcId] - foundValid = true + if objectiveData.IdList then + for npcIdIndex = 1, #objectiveData.IdList do + local killCreditNpcId = objectiveData.IdList[npcIdIndex] + if killCreditNpcId and killCreditNpcId > 0 then + local monsterResult = monster(killCreditNpcId, objective) + if monsterResult then + ret[killCreditNpcId] = monsterResult[killCreditNpcId] + foundValid = true + end end end end