comdlg32: Avoid a NULL dereference when changing the file type selection of a Unicode Win3.1-style dialog.

This commit is contained in:
Andrew Nguyen 2010-07-30 07:43:24 -05:00 committed by Alexandre Julliard
parent 4e49518a38
commit 10356abd8a
1 changed files with 2 additions and 1 deletions

View File

@ -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));