mirror of https://github.com/ppy/osu
Fix being able to trigger player before carousel is ready
Causes an eventual crash.
This commit is contained in:
parent
ce0a7d7760
commit
49e94850b6
|
@ -231,6 +231,10 @@ public void Edit(BeatmapInfo beatmap)
|
|||
/// <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();
|
||||
|
|
Loading…
Reference in New Issue