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)
committerSmallJoker <mk939@ymail.com>
Fri, 18 May 2018 10:50:47 +0000 (12:50 +0200)
mods/doors/init.lua

index 4811678da650382778d04bcf06ad55fa16d5952c..41e8b21505519a381c09339c624efc7e5ab27d66 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)