diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c index b9b90d00c18..c3131079f49 100644 --- a/dlls/credui/credui_main.c +++ b/dlls/credui/credui_main.c @@ -212,7 +212,8 @@ DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo, params.fSave = pfSave ? *pfSave : FALSE; ret = DialogBoxParamW(hinstCredUI, MAKEINTRESOURCEW(IDD_CREDDIALOG), - pUIInfo->hwndParent, CredDialogProc, (LPARAM)¶ms); + pUIInfo ? pUIInfo->hwndParent : NULL, + CredDialogProc, (LPARAM)¶ms); if (ret <= 0) return GetLastError();