summaryrefslogtreecommitdiff
path: root/src/lib/encoded_data.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-04-16 09:56:12 +0100
committerCarl Hetherington <cth@carlh.net>2015-04-16 09:56:12 +0100
commit91bd51ff82e99113860570b519459303802bd98f (patch)
tree377fdd26be524b0a8f4273b09ba7b9d1298d392a /src/lib/encoded_data.cc
parentcf0c9b44c5ec1884176a07f8f2c383ac505569a4 (diff)
A few missing checks on the return value of fopen_boost.
Diffstat (limited to 'src/lib/encoded_data.cc')
-rw-r--r--src/lib/encoded_data.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/encoded_data.cc b/src/lib/encoded_data.cc
index 1b1926017..0e8ffd6b5 100644
--- a/src/lib/encoded_data.cc
+++ b/src/lib/encoded_data.cc
@@ -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);
}