summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-05 00:40:51 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-05 00:40:51 +0000
commitd9b4e65b92e28f9126fac7660d7aba97fc1ca4ad (patch)
treea71719c8d5ba18de3e35dcb6bdad137f5e89c1fd /src/lib
parentcad7088414d36f6cdcc6f52eef192f78d92f3e07 (diff)
Throw an exception if we try to make KDMs for an unencrypted project (#1188).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 386f456b5..2b045f5c4 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1218,6 +1218,10 @@ Film::make_kdm (
dcp::Formulation formulation
) const
{
+ if (!_encrypted) {
+ throw runtime_error (_("Cannot make a KDM as this project is not encrypted."));
+ }
+
shared_ptr<const dcp::CPL> cpl (new dcp::CPL (cpl_file));
shared_ptr<const dcp::CertificateChain> signer = Config::instance()->signer_chain ();
if (!signer->valid ()) {