From d35966f082e87bd7d709442aceebfa63be245852 Mon Sep 17 00:00:00 2001 From: Pierre-Adrien Langrognet Date: Mon, 29 Aug 2016 13:25:12 +0200 Subject: [PATCH] Luacontroller tool: crashfix The crash happened when the player uses the luacontroller tool without pointing any node. --- moremesecons_luacontroller_tool/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moremesecons_luacontroller_tool/init.lua b/moremesecons_luacontroller_tool/init.lua index 142926f..15e9259 100644 --- a/moremesecons_luacontroller_tool/init.lua +++ b/moremesecons_luacontroller_tool/init.lua @@ -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