Commit df357055 authored by Alexandre Julliard's avatar Alexandre Julliard

Don't crash in DirectedYield16 if no other task is running.

parent 15344ee7
......@@ -720,6 +720,9 @@ void WINAPI DirectedYield16( HTASK16 hTask )
{
TDB *pCurTask = TASK_GetCurrent();
if (!pCurTask) OldYield16();
else
{
if (pCurTask->flags & TDBF_WIN32)
{
FIXME("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel);
......@@ -727,11 +730,10 @@ void WINAPI DirectedYield16( HTASK16 hTask )
}
TRACE("%04x: DirectedYield(%04x)\n", pCurTask->hSelf, hTask );
pCurTask->hYieldTo = hTask;
OldYield16();
TRACE("%04x: back from DirectedYield(%04x)\n", pCurTask->hSelf, hTask );
}
}
/***********************************************************************
......
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