Skip to content
Snippets Groups Projects
Commit 4f419d39 authored by Tim's avatar Tim Committed by Milan
Browse files

merge upstream commit: Doors: Fix trapdoor crash on can_dig with nil-player

parent 1f17a8b1
No related branches found
No related tags found
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment