ソースを参照

Prevent a crash if there are no views added to the Toplevel

miguel 6 年 前
コミット
00c11ad70b
1 ファイル変更1 行追加1 行削除
  1. 1 1
      Terminal.Gui/Core.cs

+ 1 - 1
Terminal.Gui/Core.cs

@@ -907,7 +907,7 @@ namespace Terminal.Gui {
 		public void FocusFirst ()
 		{
 			if (subviews == null) {
-				SuperView.SetFocus (this);
+				SuperView?.SetFocus (this);
 				return;
 			}