mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-01 03:20:03 -04:00
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:
parent
fac8f390b1
commit
0ef14d423d
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue