mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
util/foz: stop crashing on destroy if prepare hasn't been called
Fixes:eca6bb9540("util/fossilize_db: add basic fossilize db util to read/write shader caches") Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11931> (cherry picked from commit2850db0a9e)
This commit is contained in:
parent
9a70a630e1
commit
e18bb3a98c
2 changed files with 3 additions and 2 deletions
|
|
@ -1264,7 +1264,7 @@
|
|||
"description": "util/foz: stop crashing on destroy if prepare hasn't been called",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "eca6bb9540d8d1b260511cd0a71bdddb00ff4a3c"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -340,7 +340,8 @@ foz_prepare(struct foz_db *foz_db, char *cache_path)
|
|||
void
|
||||
foz_destroy(struct foz_db *foz_db)
|
||||
{
|
||||
fclose(foz_db->db_idx);
|
||||
if (foz_db->db_idx)
|
||||
fclose(foz_db->db_idx);
|
||||
for (unsigned i = 0; i < FOZ_MAX_DBS; i++) {
|
||||
if (foz_db->file[i])
|
||||
fclose(foz_db->file[i]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue