diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 6f3272149..ab274a83f 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -378,6 +378,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile end local function limit_put(stack, inv1, inv2) + if not stack or not inv1 or not inv2 then return end local leftover = ItemStack(stack) leftover = limit_put_list(leftover, inv1:get_list("main")) leftover = limit_put_list(leftover, inv2:get_list("main"))