fixed crash by nil positions on destruction effects

This commit is contained in:
Alexsandro Percy 2023-08-24 19:26:48 -03:00
parent 8e6a39ec81
commit 758ce12162
2 changed files with 2 additions and 0 deletions

View file

@ -61,6 +61,7 @@ function airutils.get_node_pos(pos)
end
function airutils.nodeatpos(pos)
if pos == nil then return end
local node = minetest.get_node_or_nil(pos)
if node then return minetest.registered_nodes[node.name] end
end