mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Fix PerformAction<T>()
potentially crashing when no matching button is found
This commit is contained in:
parent
72bf43e297
commit
d25a03984b
@ -229,7 +229,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
{
|
||||
// Buttons are regularly added in BDL or LoadComplete, so let's schedule to ensure
|
||||
// they are ready to be pressed.
|
||||
Schedule(() => Buttons.OfType<T>().First().TriggerClick());
|
||||
Schedule(() => Buttons.OfType<T>().FirstOrDefault()?.TriggerClick());
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user