From 539113c77802c35ecf937c280639a964aa5d633b Mon Sep 17 00:00:00 2001 From: crabman77 Date: Tue, 3 Mar 2015 19:31:30 +0100 Subject: [PATCH] fix infotool crash when unknow node --- minetestforfun_game/mods/default/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minetestforfun_game/mods/default/commands.lua b/minetestforfun_game/mods/default/commands.lua index 52cd86d1..9bf5fc09 100644 --- a/minetestforfun_game/mods/default/commands.lua +++ b/minetestforfun_game/mods/default/commands.lua @@ -10,7 +10,7 @@ minetest.register_craftitem("default:infotool", { on_use = function(_, user, pt) if pt.type ~= "node" then return end local nn = minetest.get_node(pt.under).name - if type(minetest.registered_items[nn].tiles[1]) ~= "string" then return end + if minetest.registered_items[nn] == nil or type(minetest.registered_items[nn].tiles[1]) ~= "string" then return end local def = minetest.registered_nodes[nn] if not def then return end