Skip to content

Commit

Permalink
Fix crash when using the screwdriver on an unknown node
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja committed Jan 16, 2014
1 parent d09d8f0 commit c971ec7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mods/screwdriver/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit c971ec7

Please sign in to comment.