mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Full impossible nullref
This commit is contained in:
@ -16,11 +16,11 @@ namespace osu.Game.Screens.Edit.Compose
|
|||||||
protected override Drawable CreateMainContent()
|
protected override Drawable CreateMainContent()
|
||||||
{
|
{
|
||||||
var ruleset = Beatmap.Value.BeatmapInfo.Ruleset?.CreateInstance();
|
var ruleset = Beatmap.Value.BeatmapInfo.Ruleset?.CreateInstance();
|
||||||
|
|
||||||
composer = ruleset?.CreateHitObjectComposer();
|
composer = ruleset?.CreateHitObjectComposer();
|
||||||
|
|
||||||
if (composer != null)
|
if (ruleset == null || composer == null)
|
||||||
{
|
return new ScreenWhiteBox.UnderConstructionMessage(ruleset == null ? "This beatmap" : $"{ruleset.Description}'s composer");
|
||||||
|
|
||||||
var beatmapSkinProvider = new BeatmapSkinProvidingContainer(Beatmap.Value.Skin);
|
var beatmapSkinProvider = new BeatmapSkinProvidingContainer(Beatmap.Value.Skin);
|
||||||
|
|
||||||
// the beatmapSkinProvider is used as the fallback source here to allow the ruleset-specific skin implementation
|
// the beatmapSkinProvider is used as the fallback source here to allow the ruleset-specific skin implementation
|
||||||
@ -32,9 +32,6 @@ namespace osu.Game.Screens.Edit.Compose
|
|||||||
return beatmapSkinProvider.WithChild(rulesetSkinProvider.WithChild(composer));
|
return beatmapSkinProvider.WithChild(rulesetSkinProvider.WithChild(composer));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ScreenWhiteBox.UnderConstructionMessage(ruleset == null ? "This beatmap" : $"{ruleset.Description}'s composer");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override Drawable CreateTimelineContent() => new TimelineHitObjectDisplay(composer.EditorBeatmap);
|
protected override Drawable CreateTimelineContent() => new TimelineHitObjectDisplay(composer.EditorBeatmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user