mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #7452 from Robyt3/Server-Max-Clients-Crash
Fix server crash on DDTeam message with lower `sv_max_clients`
This commit is contained in:
commit
90fb33ae43
|
@ -522,7 +522,7 @@ void CGameContext::SendChatTarget(int To, const char *pText, int Flags)
|
|||
void CGameContext::SendChatTeam(int Team, const char *pText)
|
||||
{
|
||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||
if(((CGameControllerDDRace *)m_pController)->m_Teams.m_Core.Team(i) == Team)
|
||||
if(m_apPlayers[i] != nullptr && ((CGameControllerDDRace *)m_pController)->m_Teams.m_Core.Team(i) == Team)
|
||||
SendChatTarget(i, pText);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue