1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:42:56 +08:00

Fix background crash on a beatmap with no storyboard

This commit is contained in:
Salman Ahmed 2023-11-09 22:56:48 +03:00
parent bd8409219f
commit 768a31b2f5
2 changed files with 3 additions and 6 deletions

View File

@ -10,7 +10,6 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Threading;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Overlays;
@ -74,15 +73,14 @@ namespace osu.Game.Graphics.Backgrounds
public void UnloadStoryboard(Action<DrawableStoryboard> scheduleStoryboardRemoval)
{
Debug.Assert(drawableStoryboard != null);
if (drawableStoryboard == null)
return;
loadCancellationSource.AsNonNull().Cancel();
loadCancellationSource = null;
DrawableStoryboard s = drawableStoryboard;
storyboardContainer.FadeOut(BackgroundScreen.TRANSITION_LENGTH, Easing.OutQuint);
scheduleStoryboardRemoval(s);
scheduleStoryboardRemoval(drawableStoryboard);
drawableStoryboard = null;
}

View File

@ -5,7 +5,6 @@
using System.Diagnostics;
using System.Threading;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;