Doors: Avoid crash on nil player in 'can dig door'
authorparamat <paramat@users.noreply.github.com>
Fri, 2 Feb 2018 18:11:17 +0000 (18:11 +0000)
committerparamat <mat.gregory@virginmedia.com>
Sat, 3 Feb 2018 03:54:03 +0000 (03:54 +0000)
mods/doors/init.lua

index 51879678ead7841a2ce9ea3ad2a9a01102483345..2685357ad51736e78a91448489c231ebfe2db1d9 100644 (file)
@@ -203,12 +203,7 @@ end
 
 local function can_dig_door(pos, digger)
        replace_old_owner_information(pos)
-       if default.can_interact_with_node(digger, pos) then
-               return true
-       else
-               minetest.record_protection_violation(pos, digger:get_player_name())
-               return false
-       end
+       return default.can_interact_with_node(digger, pos)
 end
 
 function doors.register(name, def)