Signed-off-by: Michael Stefaniuc mstefani@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); }