diff --git a/osu.Game/Scoring/ScoreManager.cs b/osu.Game/Scoring/ScoreManager.cs index a0a7e956f2..77b7ed33dd 100644 --- a/osu.Game/Scoring/ScoreManager.cs +++ b/osu.Game/Scoring/ScoreManager.cs @@ -38,12 +38,10 @@ namespace osu.Game.Scoring protected override ScoreInfo CreateModel(ArchiveReader archive) { - string filename = archive?.Filenames.FirstOrDefault(f => f.EndsWith(".osr")); - - if (filename == null) + if (archive == null) return null; - using (var stream = archive.GetStream(filename)) + using (var stream = archive.GetStream(archive.Filenames.FirstOrDefault(f => f.EndsWith(".osr")))) { try {