summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-02 09:19:12 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-02 09:19:12 +0000
commitda0138e1d48cb5fb82dec53c4e76f22e5c395e61 (patch)
treefd0c2e7202acc43daefe8847acc7d23853ab5e57
parent1192628904eb5f3c4d9f77b5adc96c6a9906b470 (diff)
Fix crash on failing to open a frame info file.
-rw-r--r--ChangeLog3
-rw-r--r--src/lib/writer.cc5
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c579b6804..51e56cbce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-12-02 Carl Hetherington <cth@carlh.net>
+ * Fix crash on checking non-existing frame info
+ files.
+
* Fix erroneous disabling of timing panel with
audio-only sources.
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index f4128e6c5..60b2a47ab 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -432,6 +432,11 @@ Writer::check_existing_picture_mxf_frame (FILE* mxf, int f, Eyes eyes)
{
/* Read the frame info as written */
FILE* ifi = fopen_boost (_film->info_path (f, eyes), "r");
+ if (!ifi) {
+ _film->log()->log (String::compose ("Existing frame %1 has no info file", f));
+ return false;
+ }
+
libdcp::FrameInfo info (ifi);
fclose (ifi);
if (info.size == 0) {