From 78a5654e1f55869acd7dbd08dedade01b4d63a79 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Mon, 5 Jan 2026 17:15:18 +0900 Subject: [PATCH] Adjust beatmap query to fix potential crash --- osu.Game/Beatmaps/BeatmapManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index d50862a369..7860dba075 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -334,7 +334,11 @@ namespace osu.Game.Beatmaps /// A matching local beatmap info if existing and in a valid state. public BeatmapInfo? QueryOnlineBeatmapId(int id) => Realm.Run(r => r.All() - .ForOnlineId(id).SingleOrDefault()?.Detach()); + .ForOnlineId(id) + // See https://github.com/ppy/osu/issues/36234 for why this isn't a SingleOrDefault(). + .FirstOrDefault() + ?.Detach() + ); /// /// A default representation of a WorkingBeatmap to use when no beatmap is available.