tcb: Fix crash when player is nil

This commit is contained in:
Linus Jahn 2020-08-18 22:17:20 +02:00 committed by orwell96
parent e4ccf8ffce
commit 00be2b5b5f
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ minetest.register_node("advtrains_interlocking:tcb_node", {
-- end -- end
--end, --end,
can_dig = function(pos, player) can_dig = function(pos, player)
if player == nil then return false end
local pname = player:get_player_name() local pname = player:get_player_name()
-- Those markers can only be dug when all adjacent TS's are set -- Those markers can only be dug when all adjacent TS's are set