From 624ec4580a1b5347224b073323cb6a39adb6ea5f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Dec 2021 14:31:59 +0900 Subject: [PATCH] Ensure `updateLocalRoomSettings` is only called after full population --- osu.Game/Online/Multiplayer/MultiplayerClient.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/osu.Game/Online/Multiplayer/MultiplayerClient.cs b/osu.Game/Online/Multiplayer/MultiplayerClient.cs index 82844af3c5..c2b9727309 100644 --- a/osu.Game/Online/Multiplayer/MultiplayerClient.cs +++ b/osu.Game/Online/Multiplayer/MultiplayerClient.cs @@ -458,11 +458,17 @@ namespace osu.Game.Online.Multiplayer { GetAPIBeatmap(playlistItem.BeatmapID).ContinueWith(b => { - Scheduler.Add(() => playlistItem.Beatmap.Value = b.Result); - }, TaskContinuationOptions.OnlyOnRanToCompletion); - } + bool success = b.IsCompletedSuccessfully; - updateLocalRoomSettings(newSettings); + Scheduler.Add(() => + { + if (success) + playlistItem.Beatmap.Value = b.Result; + + updateLocalRoomSettings(newSettings); + }); + }); + } }); return Task.CompletedTask;