summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-12 01:44:53 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:47 +0200
commite6f8bde74b9476dced103c6c54ab81616d34b97e (patch)
tree488d71b9de2368944b99b0a188adb84826f1167a /src/core/hle/kernel/thread.cpp
parentKernel: Rewind on SVC change. (diff)
downloadyuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.gz
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.bz2
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.lz
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.xz
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.zst
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.zip
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp8
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() {
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;
}