Luacontroller tool: crashfix

The crash happened when the player uses the luacontroller tool without pointing any node.
This commit is contained in:
Pierre-Adrien Langrognet 2016-08-29 13:25:12 +02:00 committed by GitHub
parent 03ae5c0ac0
commit d35966f082
1 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,9 @@ end
-- tests if the node is a luacontroller
local function is_luacontroller(pos)
if not pos then
return false
end
return string.match(minetest.get_node(pos).name, "mesecons_luacontroller:luacontroller%d%d%d%d")
end