aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/tcb_ts_ui.lua
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-08-18 22:17:20 +0200
committerorwell96 <orwell@bleipb.de>2020-09-01 15:20:15 +0200
commit00be2b5b5fc75de16c178d503ed557e5ddf28c2a (patch)
tree6a86c5b0f60eafe69db3fc1bcc5e56969f264eb3 /advtrains_interlocking/tcb_ts_ui.lua
parente4ccf8ffce10660ebf367517b12f9858fc572917 (diff)
downloadadvtrains-00be2b5b5fc75de16c178d503ed557e5ddf28c2a.tar.gz
advtrains-00be2b5b5fc75de16c178d503ed557e5ddf28c2a.tar.bz2
advtrains-00be2b5b5fc75de16c178d503ed557e5ddf28c2a.zip
tcb: Fix crash when player is nil
Diffstat (limited to 'advtrains_interlocking/tcb_ts_ui.lua')
-rw-r--r--advtrains_interlocking/tcb_ts_ui.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua
index dcf6c6e..c07a7a2 100644
--- a/advtrains_interlocking/tcb_ts_ui.lua
+++ b/advtrains_interlocking/tcb_ts_ui.lua
@@ -70,6 +70,8 @@ minetest.register_node("advtrains_interlocking:tcb_node", {
-- end
--end,
can_dig = function(pos, player)
+ if player == nil then return false end
+
local pname = player:get_player_name()
-- Those markers can only be dug when all adjacent TS's are set