From 2d18ca778f1fe9e0a881c84241bb0ae96699590b Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Wed, 28 Nov 2018 08:36:10 +0100 Subject: [PATCH] another null check for https://github.com/pandorabox-io/pandorabox.io/issues/59 --- technic/machines/HV/quarry.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 1fbb0c0..f151975 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -81,8 +81,12 @@ end local function quarry_handle_purge(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() + local cache = inv:get_list("cache") + if not cache then + return + end local i = 0 - for _,stack in ipairs(inv:get_list("cache")) do + for _,stack in ipairs(cache) do i = i + 1 if stack then local item = stack:to_table()