Merge pull request #24605 from peppy/fix-drawable-menu-item-crash

Fix potential crash when loading menu items due to cross-thread ops
This commit is contained in:
Bartłomiej Dach 2023-08-21 16:52:24 +02:00 committed by GitHub
commit a79031dddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,8 +40,14 @@ namespace osu.Game.Graphics.UserInterface
AddInternal(hoverClickSounds = new HoverClickSounds());
updateTextColour();
}
protected override void LoadComplete()
{
base.LoadComplete();
Item.Action.BindDisabledChanged(_ => updateState(), true);
FinishTransforms();
}
private void updateTextColour()