summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/audioengine.cc10
-rw-r--r--libs/ardour/export_channel.cc10
2 files changed, 14 insertions, 6 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 7df9d16e90..7da6876577 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -979,11 +979,11 @@ AudioEngine::get_port_by_name (const string& portname)
}
if (portname.find_first_of (':') != string::npos) {
- if (portname.substr (0, jack_client_name.length ()) != jack_client_name) {
- /* not an ardour: port */
- return 0;
- }
- }
+ if (portname.substr (0, jack_client_name.length ()) != jack_client_name) {
+ /* not an ardour: port */
+ return 0;
+ }
+ }
std::string const rel = make_port_name_relative (portname);
diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc
index 0f2548dd00..9c0bc38792 100644
--- a/libs/ardour/export_channel.cc
+++ b/libs/ardour/export_channel.cc
@@ -26,6 +26,8 @@
#include "ardour/export_failed.h"
#include "ardour/session.h"
+#include "pbd/error.h"
+
using namespace ARDOUR;
bool
@@ -72,7 +74,13 @@ PortExportChannel::set_state (XMLNode * node, Session & session)
XMLNodeList xml_ports = node->children ("Port");
for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) {
if ((prop = (*it)->property ("name"))) {
- ports.insert (dynamic_cast<AudioPort *> (session.engine().get_port_by_name (prop->value())));
+ std::string const & name = prop->value();
+ AudioPort * port = dynamic_cast<AudioPort *> (session.engine().get_port_by_name (name));
+ if (port) {
+ ports.insert (port);
+ } else {
+ PBD::warning << string_compose (_("Could not get port for export channel \"%1\", dropping the channel"), name) << endmsg;
+ }
}
}
}