Преглед изворни кода

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;
 			}