Juan Lang : comdlg32: Check file dialog's FOIShellView before
accessing it.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jun 7 16:26:41 CDT 2007
Module: wine
Branch: master
Commit: e14b6dcf7c02b79344476023daa4555e497cfc10
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e14b6dcf7c02b79344476023daa4555e497cfc10
Author: Juan Lang <juan_lang at yahoo.com>
Date: Thu Jun 7 12:28:32 2007 -0700
comdlg32: Check file dialog's FOIShellView before accessing it.
---
dlls/comdlg32/filedlg.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index 5409b91..11c4502 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -2021,7 +2021,8 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
}
else if( nOpenAction == ONOPEN_SEARCH )
{
- IShellView_Refresh(fodInfos->Shell.FOIShellView);
+ if (fodInfos->Shell.FOIShellView)
+ IShellView_Refresh(fodInfos->Shell.FOIShellView);
}
COMDLG32_SHFree(pidlCurrent);
SendMessageW(fodInfos->DlgInfos.hwndFileName, EM_SETSEL, 0, -1);
@@ -2322,8 +2323,11 @@ static void FILEDLG95_SHELL_Clean(HWND hwnd)
COMDLG32_SHFree(fodInfos->ShellInfos.pidlAbsCurrent);
/* clean Shell interfaces */
- IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
- IShellView_Release(fodInfos->Shell.FOIShellView);
+ if (fodInfos->Shell.FOIShellView)
+ {
+ IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
+ IShellView_Release(fodInfos->Shell.FOIShellView);
+ }
IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
IShellBrowser_Release(fodInfos->Shell.FOIShellBrowser);
if (fodInfos->Shell.FOIDataObject)
@@ -2483,7 +2487,8 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode)
}
/* Refresh the actual view to display the included items*/
- IShellView_Refresh(fodInfos->Shell.FOIShellView);
+ if (fodInfos->Shell.FOIShellView)
+ IShellView_Refresh(fodInfos->Shell.FOIShellView);
}
}
return FALSE;
More information about the wine-cvs
mailing list