Skip to content

Commit

Permalink
Fix endless player not handling load failure
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed Dec 4, 2023
1 parent 055fb5b commit 9d39b70
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions osu.Game/Overlays/SkinEditor/SkinEditorOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,21 @@ public EndlessPlayer(Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore)
{
}

protected override void LoadComplete()
{
base.LoadComplete();

if (!LoadedBeatmapSuccessfully)
Scheduler.AddDelayed(this.Exit, 3000);
}

protected override void Update()
{
base.Update();

if (!LoadedBeatmapSuccessfully)
return;

if (GameplayState.HasPassed)
GameplayClockContainer.Seek(0);
}
Expand Down

0 comments on commit 9d39b70

Please sign in to comment.