comdlg32: Check file dialog's FOIShellView before accessing it.
This commit is contained in:
parent
13f18ee759
commit
e14b6dcf7c
|
@ -2021,6 +2021,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
|||
}
|
||||
else if( nOpenAction == ONOPEN_SEARCH )
|
||||
{
|
||||
if (fodInfos->Shell.FOIShellView)
|
||||
IShellView_Refresh(fodInfos->Shell.FOIShellView);
|
||||
}
|
||||
COMDLG32_SHFree(pidlCurrent);
|
||||
|
@ -2322,8 +2323,11 @@ static void FILEDLG95_SHELL_Clean(HWND hwnd)
|
|||
COMDLG32_SHFree(fodInfos->ShellInfos.pidlAbsCurrent);
|
||||
|
||||
/* clean Shell interfaces */
|
||||
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,6 +2487,7 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode)
|
|||
}
|
||||
|
||||
/* Refresh the actual view to display the included items*/
|
||||
if (fodInfos->Shell.FOIShellView)
|
||||
IShellView_Refresh(fodInfos->Shell.FOIShellView);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue