From 65eed6f06174a6a59216c2855e4532fa480cc844 Mon Sep 17 00:00:00 2001 From: illusion98 <37698908+illusion98@users.noreply.github.com> Date: Mon, 16 Dec 2019 04:11:36 -0500 Subject: [PATCH] Merge remote-tracking branch 'CookiePLMonster/xex-unload-image' into canary-old-update --- src/xenia/kernel/kernel_state.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xenia/kernel/kernel_state.cc b/src/xenia/kernel/kernel_state.cc index 12923b9ae..9366c1160 100644 --- a/src/xenia/kernel/kernel_state.cc +++ b/src/xenia/kernel/kernel_state.cc @@ -377,7 +377,7 @@ object_ref KernelState::LoadUserModule(const char* raw_name, module = object_ref(new UserModule(this)); X_STATUS status = module->LoadFromFile(path); if (XFAILED(status)) { - object_table()->RemoveHandle(module->handle()); + object_table()->ReleaseHandle(module->handle()); return nullptr; } @@ -435,8 +435,7 @@ void KernelState::UnloadUserModule(const object_ref& module, return e->path() == module->path(); }) == user_modules_.end()); - global_lock.unlock(); - object_table()->RemoveHandle(module->handle()); + object_table()->ReleaseHandle(module->handle()); } void KernelState::TerminateTitle() {