mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-10 01:33:52 +01:00
Doors: Fix trapdoor crash on can_dig with nil-player (e.g. minetest.dig_node)
This commit is contained in:
parent
f1f96dbe6b
commit
fcceec0e8c
@ -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…
Reference in New Issue
Block a user