From a5624879c80d877626ee36114158935bc2af9076 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 23 Mar 2024 08:20:29 +1300 Subject: [PATCH] Fix crash when inventory does not exist (hopefully) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index b046d85..9f5edb3 100644 --- a/init.lua +++ b/init.lua @@ -672,7 +672,7 @@ local function dispensing(pos, meta) end -- Get all choices of item stacks in inventory - local list = inv:get_list("main") + local list = inv:get_list("main") or {} local indexes = {} for i, stack in pairs(list) do if i ~= 10 and not stack:is_empty() then