mirror of
https://github.com/ppy/osu.git
synced 2026-06-05 17:54:14 +08:00
Fix potential crash in DrawableRoom due to lack of null check on post-lookup beatmap
This commit is contained in:
@@ -418,10 +418,16 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
var retrievedBeatmap = task.GetResultSafely();
|
||||
|
||||
statusText.Text = "Currently playing ";
|
||||
beatmapText.AddLink(retrievedBeatmap.GetDisplayTitleRomanisable(),
|
||||
LinkAction.OpenBeatmap,
|
||||
retrievedBeatmap.OnlineID.ToString(),
|
||||
creationParameters: s => s.Truncate = true);
|
||||
|
||||
if (retrievedBeatmap != null)
|
||||
{
|
||||
beatmapText.AddLink(retrievedBeatmap.GetDisplayTitleRomanisable(),
|
||||
LinkAction.OpenBeatmap,
|
||||
retrievedBeatmap.OnlineID.ToString(),
|
||||
creationParameters: s => s.Truncate = true);
|
||||
}
|
||||
else
|
||||
beatmapText.AddText("unknown beatmap");
|
||||
}), cancellationSource.Token);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user