2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

k_thread: Move dereference after null check in Initialize()

Prevents a -Wnonnull warning on GCC.
This commit is contained in:
Lioncash 2021-05-29 00:31:04 -04:00
parent d25648cb6c
commit 16ff0161b3

View file

@ -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();