1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

ensure Performer not null

This commit is contained in:
cdwcgt 2023-08-02 18:53:27 +09:00
parent 1bdd054bd6
commit 6637a5e7bc
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

View File

@ -68,6 +68,12 @@ namespace osu.Game.Scoring
private void onMissingBeatmap(LegacyScoreDecoder.BeatmapNotFoundException e)
{
if (Performer == null)
{
e.ScoreStream?.Dispose();
return;
}
var req = new GetBeatmapRequest(new BeatmapInfo
{
MD5Hash = e.Hash
@ -75,7 +81,7 @@ namespace osu.Game.Scoring
req.Success += res =>
{
Performer?.PerformFromScreen(screen => screen.Push(new ReplayMissingBeatmapScreen(res, e.ScoreStream)));
Performer.PerformFromScreen(screen => screen.Push(new ReplayMissingBeatmapScreen(res, e.ScoreStream)));
};
req.Failure += _ => e.ScoreStream?.Dispose();