From 167e12759fd783f94ba0ea0fd38d9d44828214f3 Mon Sep 17 00:00:00 2001 From: Paul Sanford Date: Mon, 21 May 2018 10:54:38 -0700 Subject: [PATCH] Handle case where there's no previous focus --- Terminal.Gui/Views/Menu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs index e71ed482c..03865bfa2 100644 --- a/Terminal.Gui/Views/Menu.cs +++ b/Terminal.Gui/Views/Menu.cs @@ -382,7 +382,7 @@ namespace Terminal.Gui { selected = -1; SetNeedsDisplay (); SuperView.Remove (openMenu); - previousFocused.SuperView.SetFocus (previousFocused); + previousFocused?.SuperView.SetFocus (previousFocused); openMenu = null; }