1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 15:00:18 +01:00

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:
coil 2019-08-19 13:24:19 -04:00 committed by SmallJoker
parent fac8f390b1
commit 3a3f71aa50

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