13
0

Prevent crash when trying to register a port with a disconnected engine.

git-svn-id: svn://localhost/ardour2/branches/3.0@7925 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-10-27 21:18:18 +00:00
parent 935aeb55dd
commit 163dab0d5d

View File

@ -51,6 +51,10 @@ Port::Port (std::string const & n, DataType t, Flags f)
assert (_name.find_first_of (':') == std::string::npos);
if (!_engine->connected()) {
throw failed_constructor ();
}
if ((_jack_port = jack_port_register (_engine->jack (), _name.c_str (), t.to_jack_type (), _flags, 0)) == 0) {
throw failed_constructor ();
}