Add some assertion checks to config_write.
authorCarl Hetherington <cth@carlh.net>
Sun, 21 Feb 2016 22:04:31 +0000 (22:04 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 21 Feb 2016 22:04:31 +0000 (22:04 +0000)
src/lib/config.cc

index cf47bba8eaab2b0502962fcad7b0cfe91f527047..8370be7d1d169fae247a6a75af1ed4857590e925 100644 (file)
@@ -417,12 +417,14 @@ Config::write_config_xml () const
 #endif
 
        xmlpp::Element* signer = root->add_child ("Signer");
+       DCPOMATIC_ASSERT (_signer_chain);
        BOOST_FOREACH (dcp::Certificate const & i, _signer_chain->root_to_leaf ()) {
                signer->add_child("Certificate")->add_child_text (i.certificate (true));
        }
        signer->add_child("PrivateKey")->add_child_text (_signer_chain->key().get ());
 
        xmlpp::Element* decryption = root->add_child ("Decryption");
+       DCPOMATIC_ASSERT (_decryption_chain);
        BOOST_FOREACH (dcp::Certificate const & i, _decryption_chain->root_to_leaf ()) {
                decryption->add_child("Certificate")->add_child_text (i.certificate (true));
        }