]> git.sesse.net Git - stockfish/blobdiff - src/misc.cpp
Merge remote-tracking branch 'upstream/master'
[stockfish] / src / misc.cpp
index 43a73b2870ddce46e12bf32ab9b2f5dfcc5db4cf..2a8832d573f91a0a6a3721117e3f1e7b87d03672 100644 (file)
@@ -102,6 +102,13 @@ public:
     if (!fname.empty() && !l.file.is_open())
     {
         l.file.open(fname, ifstream::out);
+
+        if (!l.file.is_open())
+        {
+            cerr << "Unable to open debug log file " << fname << endl;
+            exit(EXIT_FAILURE);
+        }
+
         cin.rdbuf(&l.in);
         cout.rdbuf(&l.out);
     }
@@ -169,7 +176,7 @@ void dbg_print() {
 
 std::ostream& operator<<(std::ostream& os, SyncCout sc) {
 
-  static Mutex m;
+  static std::mutex m;
 
   if (sc == IO_LOCK)
       m.lock();