Skip to content

Commit 3a3f71a

Browse files
coil0SmallJoker
authored andcommittedAug 19, 2019
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.
1 parent fac8f39 commit 3a3f71a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎mods/default/functions.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ minetest.register_abm({
573573
--
574574

575575
function default.can_interact_with_node(player, pos)
576-
if player then
576+
if player and player:is_player() then
577577
if minetest.check_player_privs(player, "protection_bypass") then
578578
return true
579579
end

0 commit comments

Comments
 (0)
Please sign in to comment.