Skip to content

Commit 3c3064a

Browse files
committed
Fix QueryText null exception
1 parent 136acbd commit 3c3064a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,8 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
14581458
mainWindow.ClockPanel.Opacity = opacity;
14591459
mainWindow.SearchIcon.Opacity = opacity;
14601460

1461-
if (QueryText.Length != 0)
1461+
// QueryText sometimes is null when it is just initialized
1462+
if (QueryText != null && QueryText.Length != 0)
14621463
{
14631464
mainWindow.ClockPanel.Visibility = Visibility.Collapsed;
14641465
}

0 commit comments

Comments
 (0)