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:
parent
bd8409219f
commit
768a31b2f5
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user