fixed a nil reference (filter code didn't check for unknown nodes)

This commit is contained in:
Vanessa Ezekowitz 2013-07-15 18:50:28 -04:00
parent c0af957167
commit 26bcbd8d6f

View File

@ -59,8 +59,8 @@ minetest.register_node("pipeworks:filter", {
end end
local fromnode=minetest.get_node(frompos) local fromnode=minetest.get_node(frompos)
local frominv local frominv
if not (minetest.registered_nodes[fromnode.name].tube and if (not fromnode) or (not minetest.registered_nodes[fromnode.name]) or (not (minetest.registered_nodes[fromnode.name].tube and
minetest.registered_nodes[fromnode.name].tube.input_inventory) then minetest.registered_nodes[fromnode.name].tube.input_inventory)) then
return return
end end
local frommeta=minetest.get_meta(frompos) local frommeta=minetest.get_meta(frompos)