From 3a3f71aa50c7ef5d894d1f1e0760f164654bbeb7 Mon Sep 17 00:00:00 2001 From: coil <51716565+coil0@users.noreply.github.com> Date: Mon, 19 Aug 2019 13:24:19 -0400 Subject: [PATCH] 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. --- mods/default/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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