From ae343ef0681694e49a2735ad4912c42bb3db7c2e Mon Sep 17 00:00:00 2001 From: def Date: Tue, 5 May 2020 12:33:29 +0200 Subject: [PATCH] Fix Tick crash (fixes #73) --- src/game/server/gamecontext.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 160a9056..09d4cd3a 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -669,8 +669,13 @@ void CGameContext::OnTick() // send vote options ProgressVoteOptions(i); - m_apPlayers[i]->Tick(); - m_apPlayers[i]->PostTick(); + // ProgressVoteOptions calls SendMsg which can cause a player to be + // kicked on network problems, have to recheck + if(m_apPlayers[i]) + { + m_apPlayers[i]->Tick(); + m_apPlayers[i]->PostTick(); + } } }