[PATCH] comdlg32: Don't crash if an IShellFolder could not be created.

Alex Henrie alexhenrie24 at gmail.com
Tue Feb 14 00:55:26 CST 2017


From: Alex Henrie <alex.henrie at utah.edu>

Fixes https://bugs.winehq.org/show_bug.cgi?id=17495

Signed-off-by: Alex Henrie <alex.henrie at utah.edu>
---
 dlls/comdlg32/filedlg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index 86575aa394..8dda4f7712 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -2951,7 +2951,8 @@ static void FILEDLG95_SHELL_Clean(HWND hwnd)
       IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
       IShellView_Release(fodInfos->Shell.FOIShellView);
     }
-    IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
+    if (fodInfos->Shell.FOIShellFolder)
+      IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
     IShellBrowser_Release(fodInfos->Shell.FOIShellBrowser);
     if (fodInfos->Shell.FOIDataObject)
       IDataObject_Release(fodInfos->Shell.FOIDataObject);
-- 
2.11.1




More information about the wine-patches mailing list