projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1f96db
)
Doors: Fix trapdoor crash on can_dig with nil-player (e.g. minetest.dig_node)
author
Tim
<t4im@users.noreply.github.com>
Thu, 7 Jul 2016 22:51:54 +0000
(
00:51
+0200)
committer
paramat
<mat.gregory@virginmedia.com>
Sun, 10 Jul 2016 20:07:17 +0000
(21:07 +0100)
mods/doors/init.lua
patch
|
blob
|
history
diff --git
a/mods/doors/init.lua
b/mods/doors/init.lua
index ae41f2ddebc325efd421e6ba155f3d6ce84f4786..0f72a321de0c89d1551c24febef897bd691a6ded 100644
(file)
--- a/
mods/doors/init.lua
+++ b/
mods/doors/init.lua
@@
-543,8
+543,8
@@
function doors.register_trapdoor(name, def)
return true
end
local meta = minetest.get_meta(pos)
- local p
n =
player:get_player_name()
- return meta:get_string("doors_owner") == p
n
+ local p
layer_name = player and
player:get_player_name()
+ return meta:get_string("doors_owner") == p
layer_name
end
def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)