X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbuffer_funcs.cpp;h=03ecc90abeb9d9a8bea5c4ec654ac38fde923016;hb=66f527e417de916105680696bd44d7ad91ff60cb;hp=3f64b909f2ce827b9b0262131f1c430fe9ac4417;hpb=fdbe775b9f5468e8f53dc83a66583f412b5970fb;p=lyx.git diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index 3f64b909f2..03ecc90abe 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -47,6 +47,7 @@ #include "support/filetools.h" #include "support/gettext.h" #include "support/lstrings.h" +#include "support/mutex.h" #include "support/textutils.h" using namespace std; @@ -172,9 +173,10 @@ Buffer * newFile(string const & filename, string const & templatename, Buffer * newUnnamedFile(FileName const & path, string const & prefix, string const & templatename) { - // FIXME THREAD static map file_number; + static Mutex mutex; + Mutex::Locker locker(&mutex); FileName filename; do {