Commit e22e34ec authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Avoid accessing the advise_sink structure after it is queued.

It could already have been removed and freed. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bf5b35f1
......@@ -206,6 +206,7 @@ static HRESULT add_sink(struct system_clock *clock, DWORD_PTR handle,
sink->due_time = due_time;
sink->period = period;
sink->cookie = InterlockedIncrement(&cookie_counter);
*cookie = sink->cookie;
EnterCriticalSection(&clock->cs);
list_add_tail(&clock->sinks, &sink->entry);
......@@ -217,7 +218,6 @@ static HRESULT add_sink(struct system_clock *clock, DWORD_PTR handle,
}
WakeConditionVariable(&clock->cv);
*cookie = sink->cookie;
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment