Fix a possible nil bug

This commit is contained in:
Vanessa Ezekowitz 2013-07-12 12:52:53 -04:00
parent 38b068b2b2
commit b22a188d2d

View File

@ -245,7 +245,7 @@ minetest.register_abm({
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
end
if fuel.time <= 0 then
if (not fuel) or (fuel.time <= 0) then
meta:set_string("infotext",S("Oven out of fuel"))
hacky_swap_node(pos,"homedecor:oven")
meta:set_string("formspec", oven_inactive_formspec)