diff --git a/osu.Framework/Graphics/UserInterface/Dropdown.cs b/osu.Framework/Graphics/UserInterface/Dropdown.cs index 9b22abe57f..daa3af9d36 100644 --- a/osu.Framework/Graphics/UserInterface/Dropdown.cs +++ b/osu.Framework/Graphics/UserInterface/Dropdown.cs @@ -839,9 +839,9 @@ void IDropdown.CommitPreselection() SelectedItem = (DropdownMenuItem)preselectedItem.Item; } - void IDropdown.TriggerFocusContention(Drawable triggerSource) => GetContainingFocusManager().TriggerFocusContention(triggerSource); + void IDropdown.TriggerFocusContention(Drawable triggerSource) => GetContainingFocusManager()?.TriggerFocusContention(triggerSource); - bool IDropdown.ChangeFocus(Drawable potentialFocusTarget) => GetContainingFocusManager().ChangeFocus(potentialFocusTarget); + bool IDropdown.ChangeFocus(Drawable potentialFocusTarget) => GetContainingFocusManager()?.ChangeFocus(potentialFocusTarget) ?? false; #endregion }