From 980782ffb15b4794d6cae3a6232f173f95858c32 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 5 Jul 2020 23:58:29 +0200 Subject: [PATCH] questitem: check for existing variables first --- modules/questitem.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/questitem.lua b/modules/questitem.lua index 5fef2705..731efbb9 100644 --- a/modules/questitem.lua +++ b/modules/questitem.lua @@ -24,10 +24,10 @@ pfUI:RegisterModule("questitem", function () elseif itemcache[item] then -- read from caches quest, level = GetQuestLogTitle(itemcache[item]) - else + elseif item then -- scan for quests for id, text in pairs(questlog) do - if string.find(string.lower(text), string.lower(item), 1) then + if string.find(string.lower((text or "")), string.lower(item), 1) then quest, level = GetQuestLogTitle(id) itemcache[item] = id break