forked from nalc/nalc_game
Fix crash with nil fuel
This commit is contained in:
parent
1a9362afed
commit
d09d8f02a4
|
@ -1042,7 +1042,7 @@ minetest.register_abm({
|
||||||
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
|
||||||
end
|
end
|
||||||
|
|
||||||
if fuel.time <= 0 then
|
if not fuel or fuel.time <= 0 then
|
||||||
meta:set_string("infotext","Furnace out of fuel")
|
meta:set_string("infotext","Furnace out of fuel")
|
||||||
swap_node(pos,"default:furnace")
|
swap_node(pos,"default:furnace")
|
||||||
meta:set_string("formspec", default.furnace_inactive_formspec)
|
meta:set_string("formspec", default.furnace_inactive_formspec)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user