merge upstream commit: Doors: Fix trapdoor crash on can_dig with nil-player
This commit is contained in:
parent
1f17a8b1b2
commit
4f419d3953
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue