Parcourir la source

Prevents throw exception if Application.Current is null.

BDisp il y a 2 ans
Parent
commit
2368ec87f1
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Terminal.Gui/Core/View.cs

+ 1 - 1
Terminal.Gui/Core/View.cs

@@ -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 ();