mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-26 09:55:45 +01:00
Merge pull request #6382 from lioncash/null
k_thread: Move dereference after null check in Initialize()
This commit is contained in:
commit
cdabc9064b
@ -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));
|
||||
|
||||
// Set parent, if relevant.
|
||||
if (owner != nullptr) {
|
||||
// Setup the TLS, if needed.
|
||||
if (type == ThreadType::User) {
|
||||
tls_address = owner->CreateTLSRegion();
|
||||
}
|
||||
|
||||
// Set parent, if relevant.
|
||||
if (owner != nullptr) {
|
||||
parent = owner;
|
||||
parent->Open();
|
||||
parent->IncrementThreadCount();
|
||||
|
Loading…
Reference in New Issue
Block a user