1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 18:43:04 +08:00

Reduce assert to guard in the outwards direction

This commit is contained in:
Dean Herbert 2020-11-03 16:49:13 +09:00
parent f701a38e20
commit df9ff76f23

View File

@ -636,7 +636,10 @@ namespace osu.Game.Screens.Select
private void endLooping()
{
Debug.Assert(isHandlingLooping);
// may be called multiple times during screen exit process.
if (!isHandlingLooping)
return;
music.CurrentTrack.Looping = isHandlingLooping = false;
music.TrackChanged -= ensureTrackLooping;