[Kernel] Retain handle in ExCreateThread. Game closing a created thread's handle shouldn't result in its handle being freed.

This commit is contained in:
gibbed 2018-12-03 12:09:24 -06:00
parent dcde6308bb
commit 64b2be92d6
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ dword_result_t ExCreateThread(lpdword_t handle_ptr, dword_t stack_size,
if (creation_flags & 0x80) {
*handle_ptr = thread->guest_object();
} else {
thread->RetainHandle();
*handle_ptr = thread->handle();
}
}