mirror of
https://github.com/ppy/osu
synced 2025-03-29 14:47:04 +00:00
Fix nullref
This commit is contained in:
parent
3de65238a2
commit
28192aef90
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user