Fix furnace crash (#730)

Adds check to prevent crash, temporary fix for maps which include furnaces
This commit is contained in:
Apelta 2021-01-04 10:54:07 -06:00 committed by GitHub
parent 1da0840f11
commit 3cfb3539ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,6 +236,7 @@ local furnaces = {}
local function on_destruct(pos)
local inv = minetest.get_inventory({ type = "node", pos = pos })
if not inv then return end
for _, list in pairs(inv:get_lists()) do
for _, item in pairs(list) do
minetest.add_item(pos, item)