Verify object is player before checking privs

This prevents a crash when a NULL digger is passed by the engine to
minetest.node_dig.
This commit is contained in:
coil 2019-08-18 16:45:10 -04:00
parent fac8f390b1
commit 0ef14d423d
No known key found for this signature in database
GPG key ID: E3D074E5785FCC2C

View file

@ -573,7 +573,7 @@ minetest.register_abm({
--
function default.can_interact_with_node(player, pos)
if player then
if player and player:is_player() then
if minetest.check_player_privs(player, "protection_bypass") then
return true
end