Check if the thread pointer is valid before accessing it's data

This commit is contained in:
Alex 2023-05-04 22:42:14 +03:00
parent 71c9306828
commit d472fddb61
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -167,8 +167,9 @@ namespace Tasking
else
{
foreach (TCB *thread in Process->Threads)
if (thread->Status == Terminated)
RemoveThread(thread);
if (!InvalidTCB(thread))
if (thread->Status == Terminated)
RemoveThread(thread);
}
}