Fix race 0.7 check null pointer dereference

Found by @fokkonaut in https://github.com/ddnet/ddnet/pull/8707

Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
This commit is contained in:
ChillerDragon 2024-08-18 10:57:00 +08:00
parent f057898ce0
commit fa1ee98f1e

View file

@ -250,7 +250,7 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
const int NumPlayers = CountEnd - CountStart; const int NumPlayers = CountEnd - CountStart;
const bool LowScoreboardWidth = Scoreboard.w < 700.0f; const bool LowScoreboardWidth = Scoreboard.w < 700.0f;
bool Race7 = Client()->IsSixup() && m_pClient->m_Snap.m_pGameInfoObj->m_GameFlags & protocol7::GAMEFLAG_RACE; bool Race7 = Client()->IsSixup() && pGameInfoObj && pGameInfoObj->m_GameFlags & protocol7::GAMEFLAG_RACE;
// calculate measurements // calculate measurements
float LineHeight; float LineHeight;