Skip to content
Permalink
Browse files

Doors: Fix trapdoor crash on can_dig with nil-player (e.g. minetest.d…

…ig_node)
  • Loading branch information
t4im authored and paramat committed Jul 10, 2016
1 parent f1f96db commit fcceec0e8ce94babaaabb4ec8fe4676213ad82ab
Showing with 2 additions and 2 deletions.
  1. +2 −2 mods/doors/init.lua
@@ -543,8 +543,8 @@ function doors.register_trapdoor(name, def)
return true
end
local meta = minetest.get_meta(pos)
local pn = player:get_player_name()
return meta:get_string("doors_owner") == pn
local player_name = player and player:get_player_name()
return meta:get_string("doors_owner") == player_name
end

def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)

0 comments on commit fcceec0

Please sign in to comment.