add nil check for digger when using crystal shovel

This commit is contained in:
tenplus1 2020-07-17 20:42:32 +01:00
parent 4b020b2d20
commit 8b95cec081

View File

@ -225,7 +225,8 @@ local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, digger)
-- are we holding Crystal Shovel?
if digger:get_wielded_item():get_name() ~= "ethereal:shovel_crystal" then
if not digger
or digger:get_wielded_item():get_name() ~= "ethereal:shovel_crystal" then
return old_handle_node_drops(pos, drops, digger)
end