File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1464,10 +1464,10 @@ public bool ShouldIgnoreHotkeys()
1464
1464
1465
1465
public void Show ( )
1466
1466
{
1467
- // Invoke on UI thread
1468
- Application . Current . Dispatcher . Invoke ( ( ) =>
1467
+ // When application is exiting, the Application.Current will be null
1468
+ Application . Current ? . Dispatcher . Invoke ( ( ) =>
1469
1469
{
1470
- // When application is exitting , the Application.Current will be null
1470
+ // When application is exiting , the Application.Current will be null
1471
1471
if ( Application . Current ? . MainWindow is MainWindow mainWindow )
1472
1472
{
1473
1473
// 📌 Remove DWM Cloak (Make the window visible normally)
@@ -1539,10 +1539,10 @@ public async void Hide()
1539
1539
break ;
1540
1540
}
1541
1541
1542
- // Invoke on UI thread
1543
- Application . Current . Dispatcher . Invoke ( ( ) =>
1542
+ // When application is exiting, the Application.Current will be null
1543
+ Application . Current ? . Dispatcher . Invoke ( ( ) =>
1544
1544
{
1545
- // When application is exitting , the Application.Current will be null
1545
+ // When application is exiting , the Application.Current will be null
1546
1546
if ( Application . Current ? . MainWindow is MainWindow mainWindow )
1547
1547
{
1548
1548
// Set clock and search icon opacity
You can’t perform that action at this time.
0 commit comments