Ye I found this one too, was planning on submitting a fix but didn't get to it yet (and didn't know there was already a bug report about it).
Something like this should also work and avoids creating a Context, choose which one is better: ```diff diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index fe73c0fdd400..d483cfd39d6e 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -1337,12 +1337,14 @@ void __cdecl CurrentScheduler_Detach(void); static void WINAPI schedule_task_proc(PTP_CALLBACK_INSTANCE instance, void *context, PTP_WORK work) { schedule_task_arg arg; + Scheduler *curr_scheduler; BOOL detach = FALSE;
arg = *(schedule_task_arg*)context; operator_delete(context);
- if(&arg.scheduler->scheduler != try_get_current_scheduler()) { + curr_scheduler = try_get_current_scheduler(); + if(&arg.scheduler->scheduler != (curr_scheduler ? curr_scheduler : &default_scheduler->scheduler)) { ThreadScheduler_Attach(arg.scheduler); detach = TRUE; } ```