mirror of
https://github.com/ppy/osu.git
synced 2026-06-09 17:24:04 +08:00
Add fallback for cases where BeatmapSet may be null
Seems to only happen in tests, but better safe than sorry.
This commit is contained in:
@@ -186,7 +186,7 @@ namespace osu.Game.Beatmaps
|
||||
string IBeatmapInfo.DifficultyName => Version;
|
||||
|
||||
[JsonIgnore]
|
||||
IBeatmapMetadataInfo IBeatmapInfo.Metadata => Metadata ?? BeatmapSet.Metadata;
|
||||
IBeatmapMetadataInfo IBeatmapInfo.Metadata => Metadata ?? BeatmapSet?.Metadata ?? new BeatmapMetadata();
|
||||
|
||||
[JsonIgnore]
|
||||
IBeatmapDifficultyInfo IBeatmapInfo.Difficulty => BaseDifficulty;
|
||||
|
||||
Reference in New Issue
Block a user