mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
fixed server crash
This commit is contained in:
parent
9637215859
commit
6c3e2713de
|
@ -681,8 +681,6 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
|
||||||
{
|
{
|
||||||
AbortVoteOnDisconnect(ClientID);
|
AbortVoteOnDisconnect(ClientID);
|
||||||
m_pController->OnPlayerDisconnect(m_apPlayers[ClientID]);
|
m_pController->OnPlayerDisconnect(m_apPlayers[ClientID]);
|
||||||
delete m_apPlayers[ClientID];
|
|
||||||
m_apPlayers[ClientID] = 0;
|
|
||||||
|
|
||||||
// update clients on drop
|
// update clients on drop
|
||||||
if(Server()->ClientIngame(ClientID))
|
if(Server()->ClientIngame(ClientID))
|
||||||
|
@ -704,6 +702,9 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
|
||||||
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, -1);
|
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete m_apPlayers[ClientID];
|
||||||
|
m_apPlayers[ClientID] = 0;
|
||||||
|
|
||||||
m_VoteUpdate = true;
|
m_VoteUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue