mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Check for m_pCharacter before accessing it (fixes #3372)
This commit is contained in:
parent
0848df797a
commit
b63d20a6e0
|
@ -630,7 +630,7 @@ void CPlayer::SetTeam(int Team, bool DoChatMsg)
|
|||
if(Team == TEAM_SPECTATORS)
|
||||
{
|
||||
CGameControllerDDRace *Controller = (CGameControllerDDRace *)GameServer()->m_pController;
|
||||
if(g_Config.m_SvTeam != 3)
|
||||
if(g_Config.m_SvTeam != 3 && m_pCharacter)
|
||||
{
|
||||
// Joining spectators should not kill a locked team, but should still
|
||||
// check if the team finished by you leaving it.
|
||||
|
|
Loading…
Reference in a new issue