From 33d1ad1098a1601f5bba5768b0b252dfd70170b9 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 24 Oct 2007 16:16:14 +0100 Subject: [PATCH] credui: The pUIInfo parameter is optional to CredUIPromptForCredentials, so check before dereferencing it to get the parent window. --- dlls/credui/credui_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();