GzippedFileReader: Fix freeing potentially-invalid pointer

This commit is contained in:
Stenzek authored and refractionpcsx2 committed 2023-01-26 18:26:32 +00:00
1 parent 553a5cc455
commit 62fffaf56f
1 file changed
+1 -1
+1 -1
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);