diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-21 16:53:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-21 16:53:58 +0100 |
| commit | ac35bf2a80c9afae9dc5fcb0261929053162f44d (patch) | |
| tree | 278ecb512c1dcc090b6e3fb38acf198afdb2b579 /src/lib/cinema.cc | |
| parent | 504d613d3d7e8fbd3135e4e479ced1f51f520a04 (diff) | |
Adapt to changes in libdcp1 wrt shared_ptr and Certificate.
Diffstat (limited to 'src/lib/cinema.cc')
| -rw-r--r-- | src/lib/cinema.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/cinema.cc b/src/lib/cinema.cc index c8cb7b66c..620236186 100644 --- a/src/lib/cinema.cc +++ b/src/lib/cinema.cc @@ -70,14 +70,18 @@ Cinema::remove_screen (shared_ptr<Screen> s) Screen::Screen (cxml::ConstNodePtr node) { name = node->string_child ("Name"); - certificate = shared_ptr<dcp::Certificate> (new dcp::Certificate (node->string_child ("Certificate"))); + if (node->optional_string_child ("Certificate")) { + certificate = dcp::Certificate (node->string_child ("Certificate")); + } } void Screen::as_xml (xmlpp::Element* parent) const { parent->add_child("Name")->add_child_text (name); - parent->add_child("Certificate")->add_child_text (certificate->certificate (true)); + if (certificate) { + parent->add_child("Certificate")->add_child_text (certificate->certificate (true)); + } } |
