mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Handle potential for OnResuming
call without an OnSuspending
first
This commit is contained in:
parent
b58415fe19
commit
3495fae519
@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
@ -179,8 +178,9 @@ namespace osu.Game.Screens
|
||||
|
||||
applyArrivingDefaults(true);
|
||||
|
||||
Debug.Assert(trackAdjustmentStateAtSuspend != null);
|
||||
|
||||
// it's feasible to resume to a screen if the target screen never loaded successfully.
|
||||
// in such a case there's no need to restore this value.
|
||||
if (trackAdjustmentStateAtSuspend != null)
|
||||
musicController.AllowTrackAdjustments = trackAdjustmentStateAtSuspend.Value;
|
||||
|
||||
base.OnResuming(last);
|
||||
|
Loading…
Reference in New Issue
Block a user