From 943ad5ffe393015ed6640e094a2ced8284d2135e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 29 Nov 2019 17:01:51 +0100 Subject: [PATCH] Catch attempts to make a DCP when all content has been trimmed to zero length. --- src/lib/film.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/film.cc b/src/lib/film.cc index 9f909633a..ede367ded 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -313,6 +313,10 @@ Film::make_dcp () throw runtime_error (_("You must add some content to the DCP before creating it")); } + if (length() == DCPTime()) { + throw runtime_error (_("The DCP is empty, perhaps because all the content has zero length.")); + } + if (dcp_content_type() == 0) { throw MissingSettingError (_("content type")); } -- 2.30.2