Преглед изворни кода

Handle case where there's no previous focus

Paul Sanford пре 7 година
родитељ
комит
167e12759f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Terminal.Gui/Views/Menu.cs

+ 1 - 1
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;
 		}