summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autocrafter.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/autocrafter.lua b/autocrafter.lua
index a6d8ad1..b9edd93 100644
--- a/autocrafter.lua
+++ b/autocrafter.lua
@@ -9,7 +9,9 @@ local function make_inventory_cache(invlist)
end
local function autocraft(inventory, pos)
+ if not inventory then return end
local recipe = inventory:get_list("recipe")
+ if not recipe then return end
local recipe_last
local result
local new