Skip to content

Commit

Permalink
Fix crash race result screen on networking
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingJellyfish committed Oct 29, 2024
1 parent ab30509 commit 73271db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/states_screens/race_result_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1926,7 +1926,8 @@ void RaceResultGUI::displayPostRaceInfo()
if (RaceManager::get()->isBenchmarking())
return;

int size_esti = 1 + World::getWorld()->getHighscores()->getNumberEntries();
Highscores *highscore = World::getWorld()->getHighscores();
int size_esti = highscore ? highscore->getNumberEntries() + 1 : 1;

if (!RaceManager::get()->isSoccerMode())
size_esti += RaceManager::get()->modeHasLaps() ? 4 : 2;
Expand Down

0 comments on commit 73271db

Please sign in to comment.