mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +08:00
Ensure TakeFocus
does not crash when not yet loaded
This commit is contained in:
parent
4b975ca10d
commit
cecb312e77
@ -22,7 +22,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public void TakeFocus()
|
||||
{
|
||||
if (allowImmediateFocus) GetContainingInputManager().ChangeFocus(this);
|
||||
if (!allowImmediateFocus)
|
||||
return;
|
||||
|
||||
Schedule(() => GetContainingInputManager().ChangeFocus(this));
|
||||
}
|
||||
|
||||
public bool HoldFocus
|
||||
|
Loading…
Reference in New Issue
Block a user