Skip to content

Commit

Permalink
might not have "topComponent", use same check as in other parts of class
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Dec 15, 2023
1 parent 1e40adb commit 7021f1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions haxe/ui/focus/FocusManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ class FocusManager extends FocusManagerImpl {
applyFocus(cast value);
} else {
var top = Screen.instance.topComponent;
if (top == null) {
return null;
}
if (_lastFocuses.exists(top)) {
_lastFocuses.get(top).focus = false;
unapplyFocus(cast _lastFocuses.get(top));
Expand Down

0 comments on commit 7021f1f

Please sign in to comment.