Add a small check just to be sure to not have a crash

This commit is contained in:
Beu 2022-03-08 19:23:52 +01:00
parent 59457baa44
commit 099556c0e1

View File

@ -532,7 +532,7 @@ if (Round_ForceEndRound || Round_SkipPauseRound) {
declare CSmScore WinnerScore <=> Scores::GetBestPlayer(Race::C_Sort_RoundPoints);
if (WinnerScore == Null) {
foreach (Score in Scores) {
if (Score.BestRaceTimes.count <= 0 && AccountIdsOfPlayers.exists(Score.User.WebServicesUserId)) {
if (Score.BestRaceTimes.count <= 0 && Score.User != Null && AccountIdsOfPlayers.exists(Score.User.WebServicesUserId)) {
WinnerScore <=> Score;
break;
}