Browse Source

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

miguel 6 years ago
parent
commit
00c11ad70b
1 changed files with 1 additions and 1 deletions
  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;
 			}