Skip to content
Snippets Groups Projects
Commit 20053d6b authored by tenplus1's avatar tenplus1 Committed by paramat
Browse files

Fix bug rotating unknown node

This fixes a bug what crashes game when rotating an unknown node.
parent 079b7960
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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