From 3924fc7d8671ea75a15056430d7e7db4a6da096f Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sat, 2 May 2026 15:55:33 +0900 Subject: [PATCH] Fix duel crash due to failing lookups (#37606) --- .../Matchmaking/Queue/QueueController.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs index 8da58c94d9..aef8ee51d5 100644 --- a/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs @@ -6,7 +6,6 @@ using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; using osu.Framework.Bindables; -using osu.Framework.Extensions; using osu.Framework.Extensions.ObjectExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; @@ -186,11 +185,17 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Queue private void onMatchmakingDuelIssued(MatchmakingDuelIssuedParams duel) { - users.GetUserAsync(duel.UserId) - .ContinueWith(u => Scheduler.Add(() => - { - notifications?.Post(new DuelNotification(this, u.GetResultSafely()!, duel)); - }), TaskContinuationOptions.OnlyOnRanToCompletion); + handleDuelRequestAsync().FireAndForget(); + + async Task handleDuelRequestAsync() + { + APIUser? user = await users.GetUserAsync(duel.UserId).ConfigureAwait(false); + + if (user == null) + return; + + Scheduler.Add(() => notifications?.Post(new DuelNotification(this, user, duel))); + } } private void onMatchmakingRoomReady(long roomId, string password) => Scheduler.Add(() =>