소스 검색

Avoid exception if LastFocused is null.

BDisp 4 년 전
부모
커밋
12383e4c31
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;