Fix bug rotating unknown node

This fixes a bug what crashes game when rotating an unknown node.
This commit is contained in:
tenplus1 2016-03-11 21:45:09 +00:00 committed by paramat
parent 079b796031
commit 20053d6b52
1 changed files with 1 additions and 1 deletions

View File

@ -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