pretend that the beatmap property will not be null.

Not really throw exception will be the better way?
This commit is contained in:
andy840119 2022-07-02 13:20:46 +08:00
parent ea573f314e
commit c6d0f0f81b
2 changed files with 2 additions and 2 deletions

View File

@ -188,7 +188,7 @@ namespace osu.Game.Online.Spectator
} }
if (frame is IConvertibleReplayFrame convertible) if (frame is IConvertibleReplayFrame convertible)
pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap)); pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap!));
if (pendingFrames.Count > max_pending_frames) if (pendingFrames.Count > max_pending_frames)
purgePendingFrames(); purgePendingFrames();

View File

@ -143,7 +143,7 @@ namespace osu.Game.Scoring.Legacy
return legacyFrame; return legacyFrame;
case IConvertibleReplayFrame convertibleFrame: case IConvertibleReplayFrame convertibleFrame:
return convertibleFrame.ToLegacy(beatmap); return convertibleFrame.ToLegacy(beatmap!);
default: default:
throw new ArgumentException(@"Frame could not be converted to legacy frames", nameof(replayFrame)); throw new ArgumentException(@"Frame could not be converted to legacy frames", nameof(replayFrame));