fix crash due nil itemstack (#13)

* fix crashes due nil itemstacks
This commit is contained in:
Niklp
2023-03-10 21:30:49 +01:00
committed by GitHub
parent 40b911e184
commit 1fd279435c
2 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ local function reg_simple(name, def)
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not itemstack then return end
local pname = clicker:get_player_name()
local iname = itemstack:get_name()
local dpos = vector.add((vector.multiply(minetest.facedir_to_dir(node.param2), -1)), pos)