fix crash because of dc of player

This commit is contained in:
Beu 2021-11-01 10:33:09 +01:00
parent 24f42a8f49
commit c2f2381112

View File

@ -403,7 +403,7 @@ if (UpdateRankingTimer > 0 && Now > UpdateRankingTimer) {
if (Segment == 0) Rank = Rank + CurrentRanking[0].count - 1;
foreach (ID => Time in CurrentRanking[Segment]) {
declare CSmPlayer Player = ModeUtils::GetPlayerFromAccountId(ID);
Player.Dossard_Number = TL::FormatInteger(ML::Clamp(Rank, 0, 99), 2);
if (Player != Null) Player.Dossard_Number = TL::FormatInteger(ML::Clamp(Rank, 0, 99), 2);
if (Segment != 0) Rank = Rank + 1;
}
}