comdlg32: Populate psia_results before making any callbacks.
David Hedberg
david.hedberg at gmail.com
Mon Jul 21 16:56:46 CDT 2014
Some applications (Enterprise Architect, ..) relies on ::GetResult() returning something useful also
when called from IFileDialogEvents::OnFileOk().
Fixes bug #29908.
---
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;
--
2.0.1
More information about the wine-patches
mailing list