From fa1ee98f1eb41752d88eeb32a6883d491131aa70 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sun, 18 Aug 2024 10:57:00 +0800 Subject: [PATCH] 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> --- src/game/client/components/scoreboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp index c4f684e13..d37aca652 100644 --- a/src/game/client/components/scoreboard.cpp +++ b/src/game/client/components/scoreboard.cpp @@ -250,7 +250,7 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart, const int NumPlayers = CountEnd - CountStart; 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 float LineHeight;