Merge master.
[dcpomatic.git] / src / lib / log.cc
index 9ddf460d43ccc1c382270e607a7634a66be09049..a0b031589bf1836080c98c170c2fde1860df8dfe 100644 (file)
@@ -104,6 +104,11 @@ void
 FileLog::do_log (string m)
 {
        FILE* f = fopen_boost (_file, "a");
+       if (!f) {
+               cout << "(could not log to " << _file.string() << "): " << m << "\n";
+               return;
+       }
+
        fprintf (f, "%s\n", m.c_str ());
        fclose (f);
 }