[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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user