GzippedFileReader: Fix freeing potentially-invalid pointer

This commit is contained in:
Stenzek 2023-01-27 03:47:54 +10:00 committed by refractionpcsx2
parent 553a5cc455
commit 62fffaf56f
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ bool GzippedFileReader::OkIndex()
Console.Warning("This may take a while (but only once). Scanning compressed file to generate a quick access index...");
const s64 prevoffset = FileSystem::FTell64(m_src);
Access* index;
Access* index = nullptr;
int len = build_index(m_src, GZFILE_SPAN_DEFAULT, &index);
printf("\n"); // build_index prints progress without \n's
FileSystem::FSeek64(m_src, prevoffset, SEEK_SET);