Преглед на файлове

Prevents throw exception if Application.Current is null.

BDisp преди 2 години
родител
ревизия
2368ec87f1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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 ();