From 00c11ad70bb2f91bd05c4aa6c3d329182b509e30 Mon Sep 17 00:00:00 2001 From: miguel Date: Fri, 28 Sep 2018 22:40:37 -0400 Subject: [PATCH] Prevent a crash if there are no views added to the Toplevel --- Terminal.Gui/Core.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index 9f569b396..b4b9db72d 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -907,7 +907,7 @@ namespace Terminal.Gui { public void FocusFirst () { if (subviews == null) { - SuperView.SetFocus (this); + SuperView?.SetFocus (this); return; }