We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 526a145 + e8bde65 commit 4e96853Copy full SHA for 4e96853
osu.Game/Screens/Play/Player.cs
@@ -810,10 +810,13 @@ private Task<ScoreInfo> prepareAndImportScoreAsync(bool forceImport = false)
810
if (!canShowResults && !forceImport)
811
return Task.FromResult<ScoreInfo>(null);
812
813
+ // Clone score before beginning any async processing.
814
+ // - Must be run synchronously as the score may potentially be mutated in the background.
815
+ // - Must be cloned for the same reason.
816
+ Score scoreCopy = Score.DeepClone();
817
+
818
return prepareScoreForDisplayTask = Task.Run(async () =>
819
{
- var scoreCopy = Score.DeepClone();
-
820
try
821
822
await PrepareScoreForResultsAsync(scoreCopy).ConfigureAwait(false);
0 commit comments