[PATCH] quartz: Don't create the advise thread during the clock teardown
Michael Stefaniuc
mstefani at winehq.org
Fri Feb 23 16:34:49 CST 2018
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
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
More information about the wine-devel
mailing list