credui: The pUIInfo parameter is optional to CredUIPromptForCredentials, so check before dereferencing it to get the parent window.

This commit is contained in:
Rob Shearman 2007-10-24 16:16:14 +01:00 committed by Alexandre Julliard
parent af069ad758
commit 33d1ad1098
1 changed files with 2 additions and 1 deletions

View File

@ -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)&params); pUIInfo ? pUIInfo->hwndParent : NULL,
CredDialogProc, (LPARAM)&params);
if (ret <= 0) if (ret <= 0)
return GetLastError(); return GetLastError();