Fix null beatmap possibly being selected

This commit is contained in:
smoogipoo 2019-01-08 18:06:46 +09:00
parent 7bb4a06122
commit b17b88d071
1 changed files with 4 additions and 4 deletions

View File

@ -297,14 +297,14 @@ public void Edit(BeatmapInfo beatmap = null)
/// <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);