Minor cleanup. Fix file handle leak when opening zip files from the main screen.

This commit is contained in:
Henrik Rydgård
2025-04-07 15:42:51 +02:00
parent 0dec3526a5
commit 605daf879b
5 changed files with 25 additions and 8 deletions
+3 -1
View File
@@ -52,6 +52,7 @@
GameManager g_GameManager;
// Close the return value with ZipClose (if non-null, of course).
struct zip *ZipOpenPath(Path fileName) {
int error = 0;
// Need to special case for content URI here, similar to OpenCFile.
@@ -73,7 +74,8 @@ struct zip *ZipOpenPath(Path fileName) {
}
void ZipClose(struct zip *z) {
zip_close(z);
if (z)
zip_close(z);
}
GameManager::GameManager() {