From dac0fa832c76b240ec941c9c89d56dcf5e864f3a Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Mon, 16 Aug 2004 19:57:30 +0000 Subject: [PATCH] Fix a crash saving a file without file name extension and without extension filter. --- dlls/commdlg/filedlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c index d4ab689d923..a486c33ee36 100644 --- a/dlls/commdlg/filedlg.c +++ b/dlls/commdlg/filedlg.c @@ -1960,7 +1960,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) if (lpstrFilter != (LPWSTR)CB_ERR) /* control is not empty */ filterExt = PathFindExtensionW(lpstrFilter); - if ( *filterExt ) /* attach the file extension from file type filter*/ + if ( filterExt && *filterExt ) /* attach the file extension from file type filter*/ strcatW(lpstrPathAndFile, filterExt + 1); else if ( fodInfos->defext ) /* attach the default file extension*/ strcatW(lpstrPathAndFile, fodInfos->defext);