Fix rare crasher due to missing NULL check on netchan

Netchan could be NULL, add a check in.
This commit is contained in:
Kawe Mazidjatari 2023-07-17 17:08:37 +02:00
parent b84cfc2760
commit b5f68df826

View File

@ -121,10 +121,10 @@ void CClient::VActivatePlayer(CClient* pClient)
pClient->SetPersistenceState(PERSISTENCE::PERSISTENCE_READY);
v_CClient_ActivatePlayer(pClient);
if (sv_showconnecting->GetBool())
{
const CNetChan* pNetChan = pClient->GetNetChan();
const CNetChan* pNetChan = pClient->GetNetChan();
if (pNetChan && sv_showconnecting->GetBool())
{
DevMsg(eDLL_T::SERVER, "Activated player #%d; channel %s(%s) ('%llu')\n",
pClient->GetUserID(), pNetChan->GetName(), pNetChan->GetAddress(), pClient->GetNucleusID());
}