diff options
| author | 2020-03-11 20:44:53 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:47 -0400 | |
| commit | e6f8bde74b9476dced103c6c54ab81616d34b97e (patch) | |
| tree | 488d71b9de2368944b99b0a188adb84826f1167a /src/core/hle/kernel/thread.cpp | |
| parent | Kernel: Rewind on SVC change. (diff) | |
| download | yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.gz yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.xz yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.zip | |
General: Fix Stop function
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 1c32552b1..6f8e7a070 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -56,10 +56,12 @@ void Thread::Stop() { | |||
| 56 | Signal(); | 56 | Signal(); |
| 57 | kernel.GlobalHandleTable().Close(global_handle); | 57 | kernel.GlobalHandleTable().Close(global_handle); |
| 58 | 58 | ||
| 59 | owner_process->UnregisterThread(this); | 59 | if (owner_process) { |
| 60 | owner_process->UnregisterThread(this); | ||
| 60 | 61 | ||
| 61 | // Mark the TLS slot in the thread's page as free. | 62 | // Mark the TLS slot in the thread's page as free. |
| 62 | owner_process->FreeTLSRegion(tls_address); | 63 | owner_process->FreeTLSRegion(tls_address); |
| 64 | } | ||
| 63 | } | 65 | } |
| 64 | global_handle = 0; | 66 | global_handle = 0; |
| 65 | } | 67 | } |