1
0
mirror of https://github.com/ppy/osu synced 2025-03-29 14:47:04 +00:00

Fix nullref

This commit is contained in:
smoogipoo 2018-12-14 15:03:49 +09:00
parent 3de65238a2
commit 28192aef90

View File

@ -59,11 +59,11 @@ namespace osu.Game.Online.API.Requests.Responses
public BeatmapInfo ToBeatmap(RulesetStore rulesets) public BeatmapInfo ToBeatmap(RulesetStore rulesets)
{ {
var set = BeatmapSet.ToBeatmapSet(rulesets); var set = BeatmapSet?.ToBeatmapSet(rulesets);
return new BeatmapInfo return new BeatmapInfo
{ {
Metadata = set.Metadata, Metadata = set?.Metadata ?? this,
Ruleset = rulesets.GetRuleset(ruleset), Ruleset = rulesets.GetRuleset(ruleset),
StarDifficulty = starDifficulty, StarDifficulty = starDifficulty,
OnlineBeatmapID = OnlineBeatmapID, OnlineBeatmapID = OnlineBeatmapID,