1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +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();