Clicking the combo box would cause a crash if it was empty.

This commit is contained in:
Pierre Mageau 1999-10-31 01:52:01 +00:00 committed by Alexandre Julliard
parent c0da44e459
commit c719e35b02
1 changed files with 1 additions and 1 deletions

View File

@ -1377,7 +1377,7 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode)
lpstrFilter = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB,
iItem);
if(lpstrFilter)
if((INT)lpstrFilter != CB_ERR)
{
fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc((strlen(lpstrFilter)+1)*2);
lstrcpyAtoW(fodInfos->ShellInfos.lpstrCurrentFilter,(LPSTR)strlwr((LPSTR)lpstrFilter));