Browse Source

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

miguel 7 năm trước cách đây
mục cha
commit
00c11ad70b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
 			}