diff options
| author | 2014-11-15 01:08:00 -0500 | |
|---|---|---|
| committer | 2014-11-17 22:19:14 -0500 | |
| commit | 11641b5e7913a90d2428d7a3ad04b9963e9fa278 (patch) | |
| tree | f1a933079afdfea73e76a187441733642489e2b0 | |
| parent | Archive: Fixed close archive before freeing. (diff) | |
| download | yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.gz yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.tar.xz yuzu-11641b5e7913a90d2428d7a3ad04b9963e9fa278.zip | |
Archive: Fixed to not destroy archive handle on close.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/kernel/archive.cpp | 6 |
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: | |||
| 100 | { | 100 | { |
| 101 | DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); | 101 | DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); |
| 102 | CloseArchive(backend->GetIdCode()); | 102 | CloseArchive(backend->GetIdCode()); |
| 103 | Kernel::g_object_pool.Destroy<Archive>(GetHandle()); | ||
| 104 | break; | 103 | break; |
| 105 | } | 104 | } |
| 106 | // Unknown command... | 105 | // Unknown command... |
| @@ -304,8 +303,9 @@ Handle OpenArchive(FileSys::Archive::IdCode id_code) { | |||
| 304 | * @return Result of operation, 0 on success, otherwise error code | 303 | * @return Result of operation, 0 on success, otherwise error code |
| 305 | */ | 304 | */ |
| 306 | Result CloseArchive(FileSys::Archive::IdCode id_code) { | 305 | Result CloseArchive(FileSys::Archive::IdCode id_code) { |
| 307 | if (1 != g_archive_map.erase(id_code)) { | 306 | auto itr = g_archive_map.find(id_code); |
| 308 | ERROR_LOG(KERNEL, "Cannot close archive %d", (int) id_code); | 307 | if (itr == g_archive_map.end()) { |
| 308 | ERROR_LOG(KERNEL, "Cannot close archive %d, does not exist!", (int)id_code); | ||
| 309 | return -1; | 309 | return -1; |
| 310 | } | 310 | } |
| 311 | 311 | ||