Michael Stefaniuc : quartz: Don' t create the advise thread during the clock teardown.

Alexandre Julliard julliard at winehq.org
Mon May 14 06:54:23 CDT 2018


Module: wine
Branch: stable
Commit: 758eb9c505001f9272d2b580733c8068d8f512bc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=758eb9c505001f9272d2b580733c8068d8f512bc

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Fri Feb 23 23:34:49 2018 +0100

quartz: Don't create the advise thread during the clock teardown.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 9d704afd93ebd36a3d9e486354451684b575f9bc)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/quartz/systemclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c
index a3e1504..1638e11 100644
--- a/dlls/quartz/systemclock.c
+++ b/dlls/quartz/systemclock.c
@@ -229,7 +229,7 @@ static ULONG WINAPI SystemClockImpl_Release(IReferenceClock* iface) {
   ULONG ref = InterlockedDecrement(&This->ref);
   TRACE("(%p): ReleaseRef to %d\n", This, ref);
   if (ref == 0) {
-    if (SystemClockPostMessageToAdviseThread(This, ADVISE_EXIT)) {
+    if (This->adviseThreadActive && SystemClockPostMessageToAdviseThread(This, ADVISE_EXIT)) {
       WaitForSingleObject(This->adviseThread, INFINITE);
       CloseHandle(This->adviseThread);
     }




More information about the wine-cvs mailing list