From 290d5d9594ba6efdbea7b394d35e26131d37a08d Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sat, 5 Dec 2015 18:20:33 -0600 Subject: [PATCH] Fix incorrect double-retaining of objects on restore. --- src/xenia/kernel/xevent.cc | 1 - src/xenia/kernel/xthread.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xenia/kernel/xevent.cc b/src/xenia/kernel/xevent.cc index b0d1b7177..8b233fb5b 100644 --- a/src/xenia/kernel/xevent.cc +++ b/src/xenia/kernel/xevent.cc @@ -116,7 +116,6 @@ object_ref XEvent::Restore(KernelState* kernel_state, evt->event_->Set(); } - evt->Retain(); return object_ref(evt); } diff --git a/src/xenia/kernel/xthread.cc b/src/xenia/kernel/xthread.cc index ccd9e1cd7..106ae60be 100644 --- a/src/xenia/kernel/xthread.cc +++ b/src/xenia/kernel/xthread.cc @@ -1144,7 +1144,7 @@ object_ref XThread::Restore(KernelState* kernel_state, thread->emulator()->debugger()->OnThreadCreated(thread); } - return retain_object(thread); + return object_ref(thread); } XHostThread::XHostThread(KernelState* kernel_state, uint32_t stack_size,