From: coil <51716565+coil0@users.noreply.github.com> Date: Mon, 19 Aug 2019 17:24:19 +0000 (-0400) Subject: Verify object is player before checking privs (#2448) X-Git-Tag: 5.1.0~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3a3f71aa50c7ef5d894d1f1e0760f164654bbeb7;p=oweals%2Fminetest_game.git 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. --- diff --git a/mods/default/functions.lua b/mods/default/functions.lua index ceeeedc6..0f3cb764 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -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