General: Fix Stop function
This commit is contained in:
parent
f370de84b1
commit
e6f8bde74b
4 changed files with 25 additions and 5 deletions
|
@ -56,10 +56,12 @@ void Thread::Stop() {
|
|||
Signal();
|
||||
kernel.GlobalHandleTable().Close(global_handle);
|
||||
|
||||
owner_process->UnregisterThread(this);
|
||||
if (owner_process) {
|
||||
owner_process->UnregisterThread(this);
|
||||
|
||||
// Mark the TLS slot in the thread's page as free.
|
||||
owner_process->FreeTLSRegion(tls_address);
|
||||
// Mark the TLS slot in the thread's page as free.
|
||||
owner_process->FreeTLSRegion(tls_address);
|
||||
}
|
||||
}
|
||||
global_handle = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue