From: Michael Stefaniuc Subject: [PATCH] quartz: Don't create the advise thread during the clock teardown Message-Id: <20180223223449.21146-1-mstefani@winehq.org> Date: Fri, 23 Feb 2018 23:34:49 +0100 Signed-off-by: Michael Stefaniuc --- Fixes bug #44255. All the glory goes to Focht as there was zero brainZ involved on my side. 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 a3e1504768..1638e1117e 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); } -- 2.14.3