Use Debug.Assert instead.

This commit is contained in:
為什麼 2022-07-12 09:41:19 +08:00
parent 079fcf13a6
commit 6a643cb6ea

View File

@ -3,6 +3,7 @@
#nullable disable
using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
@ -80,8 +81,8 @@ namespace osu.Game.Screens.Play
if (!this.IsCurrentScreen())
return;
if (GameplayState.Ruleset is not ILegacyRuleset legacyRuleset)
return;
var legacyRuleset = GameplayState.Ruleset as ILegacyRuleset;
Debug.Assert(legacyRuleset != null);
bool isFirstBundle = score.Replay.Frames.Count == 0;