summaryrefslogtreecommitdiff
path: root/libs/ardour/export_profile_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-02-14 16:33:44 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-14 16:33:44 -0500
commit133251db91e7f58cfd5a57b46ead32c97b19126e (patch)
tree5f42af6958ad15f0b1437d9eb3400e00ddfafe0e /libs/ardour/export_profile_manager.cc
parent29b1e706ddaeaec5a330cf6643816ec43024b545 (diff)
possible fix for error during export format load-from-disk
Diffstat (limited to 'libs/ardour/export_profile_manager.cc')
-rw-r--r--libs/ardour/export_profile_manager.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index 7ff4282c74..08fdb96e0d 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -724,8 +724,20 @@ ExportProfileManager::load_formats ()
void
ExportProfileManager::load_format_from_disk (std::string const & path)
{
- XMLTree const tree (path);
- ExportFormatSpecPtr format = handler->add_format (*tree.root());
+ XMLTree tree;
+
+ if (!tree.read (path)) {
+ error << string_compose (_("Cannot load export format from %1"), path) << endmsg;
+ return;
+ }
+
+ XMLNode* root = tree.root();
+ if (!root) {
+ error << string_compose (_("Cannot export format read from %1"), path) << endmsg;
+ return;
+ }
+
+ ExportFormatSpecPtr format = handler->add_format (*root);
/* Handle id to filename mapping and don't add duplicates to list */