credui: The pUIInfo parameter is optional to CredUIPromptForCredentials, so check before dereferencing it to get the parent window.
This commit is contained in:
parent
af069ad758
commit
33d1ad1098
|
@ -212,7 +212,8 @@ DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo,
|
||||||
params.fSave = pfSave ? *pfSave : FALSE;
|
params.fSave = pfSave ? *pfSave : FALSE;
|
||||||
|
|
||||||
ret = DialogBoxParamW(hinstCredUI, MAKEINTRESOURCEW(IDD_CREDDIALOG),
|
ret = DialogBoxParamW(hinstCredUI, MAKEINTRESOURCEW(IDD_CREDDIALOG),
|
||||||
pUIInfo->hwndParent, CredDialogProc, (LPARAM)¶ms);
|
pUIInfo ? pUIInfo->hwndParent : NULL,
|
||||||
|
CredDialogProc, (LPARAM)¶ms);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
return GetLastError();
|
return GetLastError();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue