From e88921fe72a7194ddce480ac1cd41fe933ed5dc2 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 25 Apr 2022 16:00:49 +0200 Subject: [PATCH] Fix crash --- src/caches.lua | 2 +- src/common.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/caches.lua b/src/caches.lua index 91e54f8..63726dd 100644 --- a/src/caches.lua +++ b/src/caches.lua @@ -242,7 +242,7 @@ local function resolve_aliases(hash) end end - if newname ~= "" and i3.recipes_cache[oldname] and not hash[newname] then + if newname ~= "" and i3.recipes_cache[oldname] and reg_items[newname] and not hash[newname] then insert(i3.init_items, newname) end end diff --git a/src/common.lua b/src/common.lua index 02740e0..acc9a14 100644 --- a/src/common.lua +++ b/src/common.lua @@ -101,7 +101,7 @@ local function search(data) for i = 1, #data.items_raw do local item = data.items_raw[i] local def = reg_items[item] - local desc = lower(translate(data.lang_code, def and def.description)) or "" + local desc = lower(translate(data.lang_code, def.description)) or "" local search_in = fmt("%s %s", item, desc) local temp, j, to_add = {}, 1