From d9b4e65b92e28f9126fac7660d7aba97fc1ca4ad Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 5 Feb 2018 00:40:51 +0000 Subject: Throw an exception if we try to make KDMs for an unencrypted project (#1188). --- src/lib/film.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 cpl (new dcp::CPL (cpl_file)); shared_ptr signer = Config::instance()->signer_chain (); if (!signer->valid ()) { -- cgit v1.2.3