mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 04:45:58 +01:00
[Summary] Fixed issue with crash when invalid get_connections request is made on invalid port handle.
get_connections() method is expected to return the amount of found connections. When port handle is invalid it returns -1 indicating an error.
if (_io->nth (n)->get_connections (connections) == 0) {
if (!(*chan)->source.name.empty()) {
// _source->disable_metering ();
}
(*chan)->source.name = string();
} else {
(*chan)->source.name = connections[0];
}
-1 is the case which is not handled correctly here.
This commit is contained in:
parent
9642bfaf1a
commit
295f361f5e
1 changed files with 6 additions and 1 deletions
|
|
@ -135,7 +135,12 @@ Port::get_connections (std::vector<std::string> & c) const
|
|||
return c.size();
|
||||
}
|
||||
|
||||
return port_engine.get_connections (_port_handle, c);
|
||||
if (_port_handle) {
|
||||
port_engine.get_connections (_port_handle, c);
|
||||
return c.size();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue