summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/handle_table.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-16 09:25:29 +0100
committerbunnei <bunneidev@gmail.com>2021-01-29 06:42:26 +0100
commitff186b2498e5f3119e0d03a859754722e1948c62 (patch)
tree3bfe09f91736044f8187af6df737f61012e55801 /src/core/hle/kernel/handle_table.cpp
parentcore: hle: kernel: svc_results: Populate with several missing error codes. (diff)
downloadyuzu-ff186b2498e5f3119e0d03a859754722e1948c62.tar
yuzu-ff186b2498e5f3119e0d03a859754722e1948c62.tar.gz
yuzu-ff186b2498e5f3119e0d03a859754722e1948c62.tar.bz2
yuzu-ff186b2498e5f3119e0d03a859754722e1948c62.tar.lz
yuzu-ff186b2498e5f3119e0d03a859754722e1948c62.tar.xz
yuzu-ff186b2498e5f3119e0d03a859754722e1948c62.tar.zst
yuzu-ff186b2498e5f3119e0d03a859754722e1948c62.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/handle_table.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp
index 10a4e0510..1a2fa9cd8 100644
--- a/src/core/hle/kernel/handle_table.cpp
+++ b/src/core/hle/kernel/handle_table.cpp
@@ -89,6 +89,10 @@ ResultCode HandleTable::Close(Handle handle) {
const u16 slot = GetSlot(handle);
+ if (objects[slot].use_count() == 1) {
+ objects[slot]->Finalize();
+ }
+
objects[slot] = nullptr;
generations[slot] = next_free_slot;