X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbuffer_funcs.cpp;h=03ecc90abeb9d9a8bea5c4ec654ac38fde923016;hb=5471139ecb19923cd3410bf7f520766148daa1aa;hp=26bff558f6402ea4aeae81e78f3c99b03d6516af;hpb=afab1140e9598b136e7deb89d79275087c422ca4;p=lyx.git diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index 26bff558f6..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; @@ -173,7 +174,9 @@ Buffer * newUnnamedFile(FileName const & path, string const & prefix, string const & templatename) { static map file_number; + static Mutex mutex; + Mutex::Locker locker(&mutex); FileName filename; do {