mirror of https://github.com/ppy/osu
Make suspend stored state nullable to ensure we don't break it
This commit is contained in:
parent
fa693bb8a8
commit
b58415fe19
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
|
@ -94,7 +95,7 @@ public abstract class OsuScreen : Screen, IOsuScreen, IHasDescription
|
|||
|
||||
private OsuScreenDependencies screenDependencies;
|
||||
|
||||
private bool trackAdjustmentStateAtSuspend;
|
||||
private bool? trackAdjustmentStateAtSuspend;
|
||||
|
||||
internal void CreateLeasedDependencies(IReadOnlyDependencyContainer dependencies) => createDependencies(dependencies);
|
||||
|
||||
|
@ -178,7 +179,9 @@ public override void OnResuming(IScreen last)
|
|||
|
||||
applyArrivingDefaults(true);
|
||||
|
||||
musicController.AllowTrackAdjustments = trackAdjustmentStateAtSuspend;
|
||||
Debug.Assert(trackAdjustmentStateAtSuspend != null);
|
||||
|
||||
musicController.AllowTrackAdjustments = trackAdjustmentStateAtSuspend.Value;
|
||||
|
||||
base.OnResuming(last);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue