mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix Application.Current null exception
This commit is contained in:
parent
f07c09f6cc
commit
15730b15aa
1 changed files with 4 additions and 4 deletions
|
|
@ -1464,8 +1464,8 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
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)
|
||||
|
|
@ -1539,8 +1539,8 @@ namespace Flow.Launcher.ViewModel
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue