Fix crash when dispensing bone meal

This commit is contained in:
cora 2023-11-08 00:53:16 +01:00
parent d9193aeb2c
commit e57c25be7b

View File

@ -24,8 +24,8 @@ function mcl_bone_meal.add_bone_meal_particle(pos, def)
})
end
local function bone_meal(itemstack,user,pointed_thing)
local pname = user:get_player_name()
local function bone_meal(itemstack, user, pointed_thing)
local pname = user and user:get_player_name()
local unode = minetest.get_node(pointed_thing.under)
local anode = minetest.get_node(pointed_thing.above)
local udef = minetest.registered_nodes[unode.name]