diff --git a/src/xenia/kernel/xboxkrnl_ob.cc b/src/xenia/kernel/xboxkrnl_ob.cc index 8714a4f53..a3f154865 100644 --- a/src/xenia/kernel/xboxkrnl_ob.cc +++ b/src/xenia/kernel/xboxkrnl_ob.cc @@ -145,6 +145,10 @@ dword_result_t NtDuplicateObject(dword_t handle, lpdword_t new_handle_ptr, X_STATUS result = kernel_state()->object_table()->DuplicateHandle(handle, &new_handle); + if (new_handle_ptr) { + *new_handle_ptr = new_handle; + } + if (options == 1 /* DUPLICATE_CLOSE_SOURCE */) { // Always close the source object. kernel_state()->object_table()->RemoveHandle(handle);