diff options
| author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-01-10 01:31:22 -0500 | 
|---|---|---|
| committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-01-10 01:31:22 -0500 | 
| commit | e0039f22f8dfbd9fc3f476ced9ddd8a37e70ea68 (patch) | |
| tree | 471f678a09e505fed240b10df5ddb0541f5556b1 /autocrafter.lua | |
| parent | 6f16dd24c2dcd1de1dca87e9656498ea34331628 (diff) | |
sanity checking, stop crash in case of garbage inventory data
(i.e. that looks like nil)
Diffstat (limited to 'autocrafter.lua')
| -rw-r--r-- | autocrafter.lua | 2 | 
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 | 
