A few missing checks on the return value of fopen_boost.
[dcpomatic.git] / src / lib / encoded_data.cc
index 1b1926017993c5da335e6cada7211394c47b86ac..0e8ffd6b5cc088c17fc323c6a807c338263dcc57 100644 (file)
@@ -95,6 +95,9 @@ EncodedData::write_info (shared_ptr<const Film> film, int frame, Eyes eyes, dcp:
 {
        boost::filesystem::path const info = film->info_path (frame, eyes);
        FILE* h = fopen_boost (info, "w");
+       if (!h) {
+               throw OpenFileError (info);
+       }
        fin.write (h);
        fclose (h);
 }