1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 19:42:56 +08:00

Fix potential crash in DrawableRoom due to lack of null check on post-lookup beatmap

This commit is contained in:
Dean Herbert 2022-04-11 13:36:01 +09:00
parent 779f7390b7
commit 2b74dbca28

View File

@ -418,10 +418,16 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
var retrievedBeatmap = task.GetResultSafely(); var retrievedBeatmap = task.GetResultSafely();
statusText.Text = "Currently playing "; statusText.Text = "Currently playing ";
if (retrievedBeatmap != null)
{
beatmapText.AddLink(retrievedBeatmap.GetDisplayTitleRomanisable(), beatmapText.AddLink(retrievedBeatmap.GetDisplayTitleRomanisable(),
LinkAction.OpenBeatmap, LinkAction.OpenBeatmap,
retrievedBeatmap.OnlineID.ToString(), retrievedBeatmap.OnlineID.ToString(),
creationParameters: s => s.Truncate = true); creationParameters: s => s.Truncate = true);
}
else
beatmapText.AddText("unknown beatmap");
}), cancellationSource.Token); }), cancellationSource.Token);
} }
} }