Fix autosave thread compression TLS crash.

This commit is contained in:
Chase Cooper 2026-04-25 13:08:46 -04:00
parent 42e75876f2
commit 38568ce66b

View file

@ -731,6 +731,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
s_bgSaveActive.store(true, std::memory_order_release);
std::thread([snap, fileSize, thumb, thumbSz, meta, metaLen, this]() {
Compression::UseDefaultThreadStorage();
unsigned int compLen = fileSize + 8;
byte *buf = static_cast<byte *>(StorageManager.AllocateSaveData(compLen));
if (!buf)