1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-24 01:40:22 +01:00

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
local fromnode=minetest.get_node(frompos)
local frominv
if not (minetest.registered_nodes[fromnode.name].tube and
minetest.registered_nodes[fromnode.name].tube.input_inventory) then
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
return
end
local frommeta=minetest.get_meta(frompos)