Prevents throw exception if Application.Current is null.

This commit is contained in:
BDisp
2023-07-29 21:29:41 +01:00
committed by Tig
parent 8c7fce0472
commit 2368ec87f1

View File

@@ -371,7 +371,7 @@ namespace Terminal.Gui {
SuperView?.EnsureFocus ();
if (SuperView != null && SuperView.Focused == null) {
SuperView.FocusNext ();
if (SuperView.Focused == null) {
if (SuperView.Focused == null && Application.Current != null) {
Application.Current.FocusNext ();
}
Application.EnsuresTopOnFront ();