David Hedberg : comdlg32: Populate psia_results before making any callbacks.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 22 14:12:22 CDT 2014


Module: wine
Branch: master
Commit: 7311a9fc6e866116056c020281cdcd6dd98aaf98
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7311a9fc6e866116056c020281cdcd6dd98aaf98

Author: David Hedberg <david.hedberg at gmail.com>
Date:   Mon Jul 21 23:56:46 2014 +0200

comdlg32: Populate psia_results before making any callbacks.

---

 dlls/comdlg32/itemdlg.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c
index 2313b0a..21cdf89 100644
--- a/dlls/comdlg32/itemdlg.c
+++ b/dlls/comdlg32/itemdlg.c
@@ -536,9 +536,6 @@ static HRESULT on_default_action(FileDialogImpl *This)
         break;
 
     case ONOPEN_OPEN:
-        if(events_OnFileOk(This) != S_OK)
-            break;
-
         hr = SHGetDesktopFolder(&psf_desktop);
         if(SUCCEEDED(hr))
         {
@@ -547,10 +544,11 @@ static HRESULT on_default_action(FileDialogImpl *This)
 
             hr = SHCreateShellItemArray(NULL, psf_desktop, file_count, (PCUITEMID_CHILD_ARRAY)pidla,
                                         &This->psia_results);
-            if(SUCCEEDED(hr))
-                ret = S_OK;
 
             IShellFolder_Release(psf_desktop);
+
+            if(SUCCEEDED(hr) && events_OnFileOk(This) == S_OK)
+                ret = S_OK;
         }
         break;
 




More information about the wine-cvs mailing list