Skip to content

Commit

Permalink
Verify object is player before checking privs (#2448)
Browse files Browse the repository at this point in the history
This prevents a crash when a 'nil' digger is passed by the engine to
minetest.node_dig.
  • Loading branch information
coil0 authored and SmallJoker committed Aug 19, 2019
1 parent fac8f39 commit 3a3f71a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/default/functions.lua
Expand Up @@ -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
Expand Down

0 comments on commit 3a3f71a

Please sign in to comment.