Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bug rotating unknown node
This fixes a bug what crashes game when rotating an unknown node.
  • Loading branch information
tenplus1 authored and paramat committed Mar 13, 2016
1 parent 079b796 commit 20053d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/screwdriver/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit 20053d6

Please sign in to comment.