mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +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:
parent
a49366ff84
commit
84d36cbae7
@ -186,7 +186,7 @@ namespace osu.Game.Beatmaps
|
|||||||
string IBeatmapInfo.DifficultyName => Version;
|
string IBeatmapInfo.DifficultyName => Version;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
IBeatmapMetadataInfo IBeatmapInfo.Metadata => Metadata ?? BeatmapSet.Metadata;
|
IBeatmapMetadataInfo IBeatmapInfo.Metadata => Metadata ?? BeatmapSet?.Metadata ?? new BeatmapMetadata();
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
IBeatmapDifficultyInfo IBeatmapInfo.Difficulty => BaseDifficulty;
|
IBeatmapDifficultyInfo IBeatmapInfo.Difficulty => BaseDifficulty;
|
||||||
|
Loading…
Reference in New Issue
Block a user