add nil check for digger when using crystal shovel

master
tenplus1 2020-07-17 20:42:32 +01:00 committed by Milan
parent 8a38e99fee
commit 6a2dd7625a
1 changed files with 2 additions and 1 deletions

View File

@ -171,7 +171,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