fixed server crash

This commit is contained in:
oy 2018-12-01 14:24:00 +01:00
parent 9637215859
commit 6c3e2713de

View file

@ -681,8 +681,6 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
{
AbortVoteOnDisconnect(ClientID);
m_pController->OnPlayerDisconnect(m_apPlayers[ClientID]);
delete m_apPlayers[ClientID];
m_apPlayers[ClientID] = 0;
// update clients on drop
if(Server()->ClientIngame(ClientID))
@ -704,6 +702,9 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, -1);
}
delete m_apPlayers[ClientID];
m_apPlayers[ClientID] = 0;
m_VoteUpdate = true;
}