mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 11:06:32 +01:00
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:
parent
935aeb55dd
commit
163dab0d5d
1 changed files with 4 additions and 0 deletions
|
|
@ -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 ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue