From 0ef14d423d7536950313c807ed13b4cb065e85b7 Mon Sep 17 00:00:00 2001 From: coil <51716565+coil0@users.noreply.github.com> Date: Sun, 18 Aug 2019 16:45:10 -0400 Subject: [PATCH] Verify object is player before checking privs This prevents a crash when a NULL 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