Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1464,8 +1464,8 @@ public bool ShouldIgnoreHotkeys()

public void Show()
{
// Invoke on UI thread
Application.Current.Dispatcher.Invoke(() =>
// When application is exitting, the Application.Current will be null
Application.Current?.Dispatcher.Invoke(() =>
{
// When application is exitting, the Application.Current will be null
if (Application.Current?.MainWindow is MainWindow mainWindow)
Expand Down Expand Up @@ -1539,8 +1539,8 @@ public async void Hide()
break;
}

// Invoke on UI thread
Application.Current.Dispatcher.Invoke(() =>
// When application is exitting, the Application.Current will be null
Application.Current?.Dispatcher.Invoke(() =>
{
// When application is exitting, the Application.Current will be null
if (Application.Current?.MainWindow is MainWindow mainWindow)
Expand Down
Loading