From c971ec7dc7f5693e81535ec8f78b83ede6a33857 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Thu, 16 Jan 2014 18:32:13 -0500 Subject: [PATCH] Fix crash when using the screwdriver on an unknown node --- mods/screwdriver/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index 6f99aa5..27e1b41 100644 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -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