forked from minetest/minetest_game
Verify object is player before checking privs (#2448)
This prevents a crash when a 'nil' digger is passed by the engine to minetest.node_dig.
This commit is contained in:
parent
fac8f390b1
commit
3a3f71aa50
@ -573,7 +573,7 @@ minetest.register_abm({
|
|||||||
--
|
--
|
||||||
|
|
||||||
function default.can_interact_with_node(player, pos)
|
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
|
if minetest.check_player_privs(player, "protection_bypass") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user