Fix: Crash due to null pointer

This commit is contained in:
def 2014-01-05 23:29:19 +01:00
parent edf45538d1
commit 5423e14ac9

View file

@ -678,7 +678,7 @@ void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData)
"Admin has disabled teams");
return;
}
else if (g_Config.m_SvTeam == 2 && pResult->GetInteger(0) == 0 && pPlayer->GetCharacter()->m_LastStartWarning < pSelf->Server()->Tick() - 3 * pSelf->Server()->TickSpeed())
else if (g_Config.m_SvTeam == 2 && pResult->GetInteger(0) == 0 && pPlayer->GetCharacter() && pPlayer->GetCharacter()->m_LastStartWarning < pSelf->Server()->Tick() - 3 * pSelf->Server()->TickSpeed())
{
pSelf->Console()->Print(
IConsole::OUTPUT_LEVEL_STANDARD,