summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-11-15 07:08:00 +0100
committerbunnei <bunneidev@gmail.com>2014-11-18 04:19:14 +0100
commit11641b5e7913a90d2428d7a3ad04b9963e9fa278 (patch)
treef1a933079afdfea73e76a187441733642489e2b0 /src/core/hle
parentArchive: Fixed close archive before freeing. (diff)
downloadyuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar
yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.gz
yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.bz2
yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.lz
yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.xz
yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.zst
yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/archive.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp
index ece4cd73f..8f1c95d0f 100644
--- a/src/core/hle/kernel/archive.cpp
+++ b/src/core/hle/kernel/archive.cpp
@@ -100,7 +100,6 @@ public:
{
DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str());
CloseArchive(backend->GetIdCode());
- Kernel::g_object_pool.Destroy<Archive>(GetHandle());
break;
}
// Unknown command...
@@ -304,8 +303,9 @@ Handle OpenArchive(FileSys::Archive::IdCode id_code) {
* @return Result of operation, 0 on success, otherwise error code
*/
Result CloseArchive(FileSys::Archive::IdCode id_code) {
- if (1 != g_archive_map.erase(id_code)) {
- ERROR_LOG(KERNEL, "Cannot close archive %d", (int) id_code);
+ auto itr = g_archive_map.find(id_code);
+ if (itr == g_archive_map.end()) {
+ ERROR_LOG(KERNEL, "Cannot close archive %d, does not exist!", (int)id_code);
return -1;
}