1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-11-16 07:20:34 +01:00

sanity checking, stop crash in case of garbage inventory data

(i.e. that looks like nil)
This commit is contained in:
Vanessa Ezekowitz 2015-01-10 01:31:22 -05:00
parent 6f16dd24c2
commit e0039f22f8

View File

@ -9,7 +9,9 @@ local function make_inventory_cache(invlist)
end end
local function autocraft(inventory, pos) local function autocraft(inventory, pos)
if not inventory then return end
local recipe = inventory:get_list("recipe") local recipe = inventory:get_list("recipe")
if not recipe then return end
local recipe_last local recipe_last
local result local result
local new local new