Skip to content

Commit

Permalink
Fix Tick crash (fixes ddnet#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed May 5, 2020
1 parent 4fc2b68 commit ae343ef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/game/server/gamecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

Expand Down

0 comments on commit ae343ef

Please sign in to comment.