Explorar el Código

Avoid exception if LastFocused is null.

BDisp hace 4 años
padre
commit
12383e4c31
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;