Fix crash when using the screwdriver on an unknown node

This commit is contained in:
ShadowNinja 2014-01-16 18:32:13 -05:00
parent d09d8f02a4
commit c971ec7dc7

View File

@ -71,9 +71,8 @@ local function screwdriver_handler(itemstack, user, pointed_thing)
return return
end end
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
local node_name = node.name
local ndef = minetest.registered_nodes[node.name] local ndef = minetest.registered_nodes[node.name]
if ndef.paramtype2 == "facedir" then if ndef and ndef.paramtype2 == "facedir" then
if ndef.drawtype == "nodebox" and ndef.node_box.type ~= "fixed" then if ndef.drawtype == "nodebox" and ndef.node_box.type ~= "fixed" then
return return
end end