From 20053d6b52f3f500a0a96a20cbf0a08c439c4142 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 11 Mar 2016 21:45:09 +0000 Subject: [PATCH] Fix bug rotating unknown node This fixes a bug what crashes game when rotating an unknown node. --- mods/screwdriver/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index 34b4b4a8..6b82d042 100644 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -36,7 +36,7 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode) local node = minetest.get_node(pos) local ndef = minetest.registered_nodes[node.name] -- verify node is facedir (expected to be rotatable) - if ndef.paramtype2 ~= "facedir" then + if not ndef or ndef.paramtype2 ~= "facedir" then return end -- Compute param2 -- 2.25.1