]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.cpp
GuiDocument: some polishing of the list of modules.
[lyx.git] / src / buffer_funcs.cpp
index 26bff558f6402ea4aeae81e78f3c99b03d6516af..03ecc90abeb9d9a8bea5c4ec654ac38fde923016 100644 (file)
@@ -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<string, int> file_number;
+       static Mutex mutex;
 
+       Mutex::Locker locker(&mutex);
        FileName filename;
 
        do {