From 10356abd8ae768357209b5dcee20933ec398e8d7 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Fri, 30 Jul 2010 07:43:24 -0500 Subject: [PATCH] comdlg32: Avoid a NULL dereference when changing the file type selection of a Unicode Win3.1-style dialog. --- dlls/comdlg32/filedlg31.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c index fd2ef36a5cf..89ef0e3e031 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)); -- 2.11.4.GIT