Skip to content
Snippets Groups Projects
Commit c971ec7d authored by ShadowNinja's avatar ShadowNinja
Browse files

Fix crash when using the screwdriver on an unknown node

parent d09d8f02
No related branches found
No related tags found
No related merge requests found
......@@ -71,9 +71,8 @@ local function screwdriver_handler(itemstack, user, pointed_thing)
return
end
local node = minetest.get_node(pos)
local node_name = 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
return
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment