diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-29 10:17:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 10:17:28 +0200 |
commit | cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96 (patch) | |
tree | 16742f5331403173ab7bd6d3d32dc5cf56ce0267 | |
parent | Merge pull request #6373 from bunnei/use-slabheap-tls (diff) | |
parent | k_thread: Move dereference after null check in Initialize() (diff) | |
download | yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.tar yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.tar.gz yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.tar.bz2 yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.tar.lz yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.tar.xz yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.tar.zst yuzu-cdabc9064bbc2e289ac0b3e3a6aae4cf500bce96.zip |
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index e3f08f256..3cf43d290 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -168,13 +168,13 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s std::memset(static_cast<void*>(std::addressof(GetStackParameters())), 0, sizeof(StackParameters)); - // Setup the TLS, if needed. - if (type == ThreadType::User) { - tls_address = owner->CreateTLSRegion(); - } - // Set parent, if relevant. if (owner != nullptr) { + // Setup the TLS, if needed. + if (type == ThreadType::User) { + tls_address = owner->CreateTLSRegion(); + } + parent = owner; parent->Open(); parent->IncrementThreadCount(); |