mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-05 23:33:51 +01:00
Fix bug rotating unknown node
This fixes a bug what crashes game when rotating an unknown node.
This commit is contained in:
parent
079b796031
commit
20053d6b52
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user