Fix segfault when opening a pak that doesn't exist

This commit is contained in:
Abdelrahman Said 2023-11-04 11:38:06 +00:00
parent 7b472cac4b
commit 1be318c239

View File

@ -229,7 +229,9 @@ void close_asset_pack(asset_pack_t **pack) {
free((*pack)->toc); free((*pack)->toc);
} }
if ((*pack)->fp) {
fclose((*pack)->fp); fclose((*pack)->fp);
}
free(*pack); free(*pack);