diff --git a/home_vending_machines/api.lua b/home_vending_machines/api.lua index ccad0bf..9155ee3 100644 --- a/home_vending_machines/api.lua +++ b/home_vending_machines/api.lua @@ -28,6 +28,9 @@ 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)