mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 01:42:59 +08:00
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:
commit
a79031dddd
@ -40,8 +40,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
AddInternal(hoverClickSounds = new HoverClickSounds());
|
AddInternal(hoverClickSounds = new HoverClickSounds());
|
||||||
|
|
||||||
updateTextColour();
|
updateTextColour();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
Item.Action.BindDisabledChanged(_ => updateState(), true);
|
Item.Action.BindDisabledChanged(_ => updateState(), true);
|
||||||
|
FinishTransforms();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateTextColour()
|
private void updateTextColour()
|
||||||
|
Loading…
Reference in New Issue
Block a user