TaskFocusNext(): avoid resetting _task if sys_focus_task is NULL

This commit is contained in:
Michael Mikonos 2023-11-02 20:49:51 +08:00
parent cc44a57fd7
commit 5429d214f4

View file

@ -37,10 +37,14 @@ $HL,1$*/
U0 TaskFocusNext()
{
CTask *task, *_task = sys_focus_task;
CTask *task, *_task;
if (sys_focus_task)
{
_task = sys_focus_task;
sys_focus_task = NULL;
if (!_task)
}
else
_task = sys_task;
task = _task->next_task;
do