Handle case where there's no previous focus

This commit is contained in:
Paul Sanford
2018-05-21 10:54:38 -07:00
parent dbd1ae0562
commit 167e12759f

View File

@@ -382,7 +382,7 @@ namespace Terminal.Gui {
selected = -1;
SetNeedsDisplay ();
SuperView.Remove (openMenu);
previousFocused.SuperView.SetFocus (previousFocused);
previousFocused?.SuperView.SetFocus (previousFocused);
openMenu = null;
}