From eaf05aa31a0e346352ec04f26087e6cd6b9fa410 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Sat, 25 Apr 2020 12:18:40 -0700 Subject: [PATCH] Defensive check for QueryText being empty --- src/modules/launcher/PowerLauncher/MainWindow.xaml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs index 1f794b4055..f264514e12 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs @@ -351,8 +351,7 @@ namespace PowerLauncher private string ListView_FirstItem(String input) { - string s = input; - if (s.Length > 0) + if (!String.IsNullOrEmpty(input)) { String selectedItem = _viewModel.Results?.SelectedItem?.ToString(); int selectedIndex = _viewModel.Results.SelectedIndex;