From e2b9d73f8e804f5e67833caf7a8451d699f4a06f Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Tue, 7 Apr 2020 18:05:11 +0000 Subject: [PATCH] fix crash of unknown origin --- tubelib/distributor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubelib/distributor.lua b/tubelib/distributor.lua index 0d70cad..1ca0607 100644 --- a/tubelib/distributor.lua +++ b/tubelib/distributor.lua @@ -72,7 +72,7 @@ local State = tubelib.NodeStates:new({ -- Return a key/value table with all items and the corresponding stack numbers local function invlist_content_as_kvlist(list) local res = {} - for idx,items in ipairs(list) do + for idx,items in ipairs(list or {}) do local name = items:get_name() if name ~= "" then res[name] = idx