diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 4c2164d1960..8c8e230ea68 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -2787,6 +2787,8 @@ static BOOL FILEDLG95_LOOKIN_OnCommand(HWND hwnd, WORD wNotifyCode) iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB); + if( iItem == CB_ERR) return FALSE; + if(!(tmpFolder = (LPSFOLDER) CBGetItemDataPtr(fodInfos->DlgInfos.hwndLookInCB, iItem))) return FALSE;