1
0
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:
Dean Herbert
2021-11-04 15:22:32 +09:00
Unverified
parent a49366ff84
commit 84d36cbae7
+1 -1
View File
@@ -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;