mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-27 15:04:33 +00:00
Check if the thread pointer is valid before accessing it's data
This commit is contained in:
parent
71c9306828
commit
d472fddb61
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user