diff --git a/reactos/base/system/winlogon/sas.c b/reactos/base/system/winlogon/sas.c index c90121db5f4..8e1981cabf7 100644 --- a/reactos/base/system/winlogon/sas.c +++ b/reactos/base/system/winlogon/sas.c @@ -873,13 +873,14 @@ SASWindowProc( /* Save the Session pointer */ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)Session); - if (GetSetupType() == 0) + if (GetSetupType()) return TRUE; return RegisterHotKeys(Session, hwndDlg); } case WM_DESTROY: { - UnregisterHotKeys(Session, hwndDlg); + if (!GetSetupType()) + UnregisterHotKeys(Session, hwndDlg); return TRUE; } case WM_SETTINGCHANGE: