diff options
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index f021b0550..62ce2fbd5 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -1015,8 +1015,13 @@ ResultVal<std::shared_ptr<KThread>> KThread::Create(Core::System& system, Thread std::shared_ptr<KThread> thread = std::make_shared<KThread>(kernel); - thread->InitializeThread(thread.get(), entry_point, arg, stack_top, priority, processor_id, - owner_process, type_flags); + if (const auto result = + thread->InitializeThread(thread.get(), entry_point, arg, stack_top, priority, + processor_id, owner_process, type_flags); + result.IsError()) { + return result; + } + thread->name = name; auto& scheduler = kernel.GlobalSchedulerContext(); |