File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 60
60
61
61
PHAPPAPI HWND PhMainWndHandle ;
62
62
BOOLEAN PhMainWndExiting = FALSE;
63
+ BOOLEAN PhMainWndEarlyExit = FALSE;
63
64
HMENU PhMainWndMenuHandle ;
64
65
65
66
PH_PROVIDER_REGISTRATION PhMwpProcessProviderRegistration ;
@@ -493,6 +494,8 @@ VOID PhMwpOnDestroy(
493
494
VOID
494
495
)
495
496
{
497
+ PhMainWndExiting = TRUE;
498
+
496
499
PhSetIntegerSetting (L"MainWindowTabRestoreIndex" , TabCtrl_GetCurSel (TabControlHandle ));
497
500
498
501
// Notify pages and plugins that we are shutting down.
@@ -502,8 +505,8 @@ VOID PhMwpOnDestroy(
502
505
if (PhPluginsEnabled )
503
506
PhUnloadPlugins ();
504
507
505
- if (!PhMainWndExiting )
506
- ProcessHacker_SaveAllSettings ( PhMainWndHandle );
508
+ if (!PhMainWndEarlyExit )
509
+ PhMwpSaveSettings ( );
507
510
508
511
PhNfUninitialization ();
509
512
@@ -1836,7 +1839,7 @@ ULONG_PTR PhMwpOnUserMessage(
1836
1839
{
1837
1840
case WM_PH_ACTIVATE :
1838
1841
{
1839
- if (!PhMainWndExiting )
1842
+ if (!PhMainWndEarlyExit && ! PhMainWndExiting )
1840
1843
{
1841
1844
if (WParam != 0 )
1842
1845
{
@@ -1882,12 +1885,12 @@ ULONG_PTR PhMwpOnUserMessage(
1882
1885
case WM_PH_PREPARE_FOR_EARLY_SHUTDOWN :
1883
1886
{
1884
1887
PhMwpSaveSettings ();
1885
- PhMainWndExiting = TRUE;
1888
+ PhMainWndEarlyExit = TRUE;
1886
1889
}
1887
1890
break ;
1888
1891
case WM_PH_CANCEL_EARLY_SHUTDOWN :
1889
1892
{
1890
- PhMainWndExiting = FALSE;
1893
+ PhMainWndEarlyExit = FALSE;
1891
1894
}
1892
1895
break ;
1893
1896
case WM_PH_DELAYED_LOAD_COMPLETED :
You can’t perform that action at this time.
0 commit comments