fixed a nil reference (filter code didn't check for unknown nodes)
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Mon, 15 Jul 2013 22:50:28 +0000 (18:50 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Mon, 15 Jul 2013 22:50:28 +0000 (18:50 -0400)
item_transport.lua

index c89fc06e23d0afd5bf870abdb1bc1e2aa0de2846..24fe5a9afbae8a7c2df69370186c515720fc8e67 100644 (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)