Verify object is player before checking privs backported for mt 0.4.17 game

* backported 3a3f71aa50
* prevents a crash when a 'nil' digger is passed by the engine to minetest.node_dig
This commit is contained in:
mckaygerhard 2022-04-14 21:04:28 -04:00
parent d18f9b4251
commit 812bb323f6

View File

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