From 00be2b5b5fc75de16c178d503ed557e5ddf28c2a Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Tue, 18 Aug 2020 22:17:20 +0200 Subject: tcb: Fix crash when player is nil --- advtrains_interlocking/tcb_ts_ui.lua | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3