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

Alexandre Julliard julliard at winehq.org
Thu Oct 25 08:38:42 CDT 2007


Module: wine
Branch: master
Commit: 33d1ad1098a1601f5bba5768b0b252dfd70170b9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=33d1ad1098a1601f5bba5768b0b252dfd70170b9

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Oct 24 16:16:14 2007 +0100

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 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c
index b9b90d0..c313107 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)&params);
+                          pUIInfo ? pUIInfo->hwndParent : NULL,
+                          CredDialogProc, (LPARAM)&params);
     if (ret <= 0)
         return GetLastError();
 




More information about the wine-cvs mailing list