Added nil player check when digging protectors (thanks expertmm)

This commit is contained in:
TenPlus1 2017-02-22 21:11:48 +00:00
parent 3e3e24dbef
commit 5d1f2e2c01

@ -442,7 +442,7 @@ minetest.register_node("protector:protect", {
can_dig = function(pos, player)
return protector.can_dig(1, pos, player:get_player_name(), true, 1)
return player and protector.can_dig(1, pos, player:get_player_name(), true, 1)
end,
on_blast = function() end,
@ -522,7 +522,7 @@ minetest.register_node("protector:protect2", {
can_dig = function(pos, player)
return protector.can_dig(1, pos, player:get_player_name(), true, 1)
return player and protector.can_dig(1, pos, player:get_player_name(), true, 1)
end,
on_blast = function() end,