Browse Source

Avoid exception if LastFocused is null.

BDisp 4 years ago
parent
commit
12383e4c31
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Views/Menu.cs

+ 1 - 1
Terminal.Gui/Views/Menu.cs

@@ -1415,7 +1415,7 @@ namespace Terminal.Gui {
 				CloseMenu ();
 				if (openedByAltKey) {
 					openedByAltKey = false;
-					LastFocused.SetFocus ();
+					LastFocused?.SetFocus ();
 				}
 				break;