Module: wine Branch: master Commit: f4b1454f335de46b20812cf06b46270930947c5f URL: https://source.winehq.org/git/wine.git/?a=commit;h=f4b1454f335de46b20812cf06...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Jan 22 17:05:34 2018 +0100
ole32: Post quit message after leaving wait loop in CoWaitForMultipleHandles.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ole32/compobj.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 3da3c2f..08455bf 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4467,6 +4467,8 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout, APARTMENT *apt = COM_CurrentApt(); BOOL message_loop = apt && !apt->multi_threaded; BOOL check_apc = (dwFlags & COWAIT_ALERTABLE) != 0; + BOOL post_quit = FALSE; + UINT exit_code;
TRACE("(0x%08x, 0x%08x, %d, %p, %p)\n", dwFlags, dwTimeout, cHandles, pHandles, lpdwindex); @@ -4563,7 +4565,8 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout, if (msg.message == WM_QUIT) { TRACE("resending WM_QUIT to outer message loop\n"); - PostQuitMessage(msg.wParam); + post_quit = TRUE; + exit_code = msg.wParam; /* no longer need to process messages */ message_loop = FALSE; break; @@ -4595,6 +4598,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout, } break; } + if (post_quit) PostQuitMessage(exit_code); TRACE("-- 0x%08x\n", hr); return hr; }