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