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

Alexandre Julliard julliard at winehq.org
Mon Feb 26 13:42:20 CST 2018


Module: wine
Branch: master
Commit: 9d704afd93ebd36a3d9e486354451684b575f9bc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9d704afd93ebd36a3d9e486354451684b575f9bc

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>

---

 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