From: paramat Date: Fri, 2 Feb 2018 18:11:17 +0000 (+0000) Subject: Doors: Avoid crash on nil player in 'can dig door' X-Git-Tag: 0.4.17.1~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2c1af0861f799a7eefe359c70a6ce3065ceb3dbf;p=oweals%2Fminetest_game.git Doors: Avoid crash on nil player in 'can dig door' --- diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 4811678d..41e8b215 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -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)