mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-11 18:40:25 +01:00
fix infotool crash when unknow node
This commit is contained in:
parent
30ac1e2c6c
commit
539113c778
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user