Andrew Nguyen : comdlg32: Avoid a NULL dereference when changing the file type selection of a Unicode Win3 .1-style dialog.
Alexandre Julliard
julliard at winehq.org
Fri Jul 30 10:24:17 CDT 2010
Module: wine
Branch: master
Commit: 10356abd8ae768357209b5dcee20933ec398e8d7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=10356abd8ae768357209b5dcee20933ec398e8d7
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Fri Jul 30 07:43:24 2010 -0500
comdlg32: Avoid a NULL dereference when changing the file type selection of a Unicode Win3.1-style dialog.
---
dlls/comdlg32/filedlg31.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c
index fd2ef36..89ef0e3 100644
--- a/dlls/comdlg32/filedlg31.c
+++ b/dlls/comdlg32/filedlg31.c
@@ -630,7 +630,8 @@ static LRESULT FD31_FileTypeChange( const FD31_DATA *lfs )
if (lRet == LB_ERR)
return TRUE;
lfs->ofnW->nFilterIndex = lRet + 1;
- lfs->ofnA->nFilterIndex = lRet + 1;
+ if (lfs->ofnA)
+ lfs->ofnA->nFilterIndex = lRet + 1;
pstr = (LPWSTR)SendDlgItemMessageW(lfs->hwnd, cmb1, CB_GETITEMDATA, lRet, 0);
TRACE("Selected filter : %s\n", debugstr_w(pstr));
More information about the wine-cvs
mailing list