From c9773f1ee96f55634695f3dc2bfb06b6909e8758 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sun, 12 Jan 2020 09:47:51 +0100 Subject: [PATCH] Fix crash --- init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index df677d3..1498813 100644 --- a/init.lua +++ b/init.lua @@ -590,10 +590,15 @@ local function get_recipes(item, data, player) end local no_recipes = not recipes or #recipes == 0 + if no_recipes and not usages then return - elseif sfinv_only and usages and no_recipes then - data.show_usages = true + elseif sfinv_only then + if usages and no_recipes then + data.show_usages = true + elseif recipes and not usages then + data.show_usages = nil + end end if not sfinv_only or (sfinv_only and data.show_usages) then