mirror of https://github.com/ppy/osu
pretend that the beatmap property will not be null.
Not really throw exception will be the better way?
This commit is contained in:
parent
ea573f314e
commit
c6d0f0f81b
|
@ -188,7 +188,7 @@ public void HandleFrame(ReplayFrame frame) => Schedule(() =>
|
|||
}
|
||||
|
||||
if (frame is IConvertibleReplayFrame convertible)
|
||||
pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap));
|
||||
pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap!));
|
||||
|
||||
if (pendingFrames.Count > max_pending_frames)
|
||||
purgePendingFrames();
|
||||
|
|
|
@ -143,7 +143,7 @@ private LegacyReplayFrame getLegacyFrame(ReplayFrame replayFrame)
|
|||
return legacyFrame;
|
||||
|
||||
case IConvertibleReplayFrame convertibleFrame:
|
||||
return convertibleFrame.ToLegacy(beatmap);
|
||||
return convertibleFrame.ToLegacy(beatmap!);
|
||||
|
||||
default:
|
||||
throw new ArgumentException(@"Frame could not be converted to legacy frames", nameof(replayFrame));
|
||||
|
|
Loading…
Reference in New Issue