mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 15:26:43 +00:00
TaskFocusNext(): avoid resetting _task if sys_focus_task is NULL
This commit is contained in:
parent
cc44a57fd7
commit
5429d214f4
1 changed files with 7 additions and 3 deletions
|
@ -37,10 +37,14 @@ $HL,1$*/
|
||||||
|
|
||||||
U0 TaskFocusNext()
|
U0 TaskFocusNext()
|
||||||
{
|
{
|
||||||
CTask *task, *_task = sys_focus_task;
|
CTask *task, *_task;
|
||||||
|
|
||||||
|
if (sys_focus_task)
|
||||||
|
{
|
||||||
|
_task = sys_focus_task;
|
||||||
sys_focus_task = NULL;
|
sys_focus_task = NULL;
|
||||||
if (!_task)
|
}
|
||||||
|
else
|
||||||
_task = sys_task;
|
_task = sys_task;
|
||||||
task = _task->next_task;
|
task = _task->next_task;
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue