mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08:00
Fix null beatmap possibly being selected
This commit is contained in:
parent
7bb4a06122
commit
b17b88d071
@ -297,14 +297,14 @@ namespace osu.Game.Screens.Select
|
||||
/// <param name="performStartAction">Whether to trigger <see cref="OnStart"/>.</param>
|
||||
public void FinaliseSelection(BeatmapInfo beatmap = null, bool performStartAction = true)
|
||||
{
|
||||
// avoid attempting to continue before a selection has been obtained.
|
||||
// this could happen via a user interaction while the carousel is still in a loading state.
|
||||
if (Carousel.SelectedBeatmap == null) return;
|
||||
|
||||
// if we have a pending filter operation, we want to run it now.
|
||||
// it could change selection (ie. if the ruleset has been changed).
|
||||
Carousel.FlushPendingFilterOperations();
|
||||
|
||||
// avoid attempting to continue before a selection has been obtained.
|
||||
// this could happen via a user interaction while the carousel is still in a loading state.
|
||||
if (Carousel.SelectedBeatmap == null) return;
|
||||
|
||||
if (beatmap != null)
|
||||
Carousel.SelectBeatmap(beatmap);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user