1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Fix null ref in ComposeScreen when ruleset doesn't provide a composer

This commit is contained in:
Dean Herbert 2022-01-28 14:01:10 +09:00
parent d1158acb82
commit 91be77ad3d

View File

@ -82,6 +82,11 @@ namespace osu.Game.Screens.Edit.Compose
protected override void LoadComplete()
{
base.LoadComplete();
// May be null in the case of a ruleset that doesn't have editor support, see CreateMainContent().
if (composer == null)
return;
EditorBeatmap.SelectedHitObjects.BindCollectionChanged((_, __) => updateClipboardActionAvailability());
clipboard.BindValueChanged(_ => updateClipboardActionAvailability());
composer.OnLoadComplete += _ => updateClipboardActionAvailability();