Browse Source

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.
coil 4 years ago
parent
commit
3a3f71aa50
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mods/default/functions.lua

+ 1 - 1
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