1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Oops, the once_flag must be static!

This commit is contained in:
Paul Licameli 2020-07-11 23:44:20 -04:00
parent 87d82e76c7
commit f34b9697c0

View File

@ -90,7 +90,7 @@ ProjectSerializer::ProjectSerializer(size_t allocSize)
mDict.SetBufSize(allocSize);
mBuffer.SetBufSize(allocSize);
std::once_flag flag;
static std::once_flag flag;
std::call_once(flag, []{
// Just once per run, store header information in the unique static
// dictionary that will be written into each project that is saved.