Fix crash with nil fuel
authorShadowNinja <noreply@gmail.com>
Sat, 11 Jan 2014 16:27:21 +0000 (11:27 -0500)
committerShadowNinja <noreply@gmail.com>
Sat, 11 Jan 2014 16:27:21 +0000 (11:27 -0500)
mods/default/nodes.lua

index 34b873e521da52ee623019dfb1383a0c4e0417c9..cc0f1ac861b70cad5e7952810b12fc3a81970d55 100644 (file)
@@ -1042,7 +1042,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","Furnace out of fuel")
                        swap_node(pos,"default:furnace")
                        meta:set_string("formspec", default.furnace_inactive_formspec)