summaryrefslogtreecommitdiff
path: root/libs/ardour/port.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-08 21:01:26 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:11 -0400
commit3c3d62c18a88c9a3ce8ae4d5f7a44470d302a1bf (patch)
treec6f905e7e4723c2d2d4a8dea5bc277b1e8521eb7 /libs/ardour/port.cc
parent32224ee60800a86fb53cef05e157a9246be21018 (diff)
Fixed issue with crash when invalid get_connections request is made on invalid port handle. (Grygorii)
Diffstat (limited to 'libs/ardour/port.cc')
-rw-r--r--libs/ardour/port.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc
index 3252134ac3..70c6a604d7 100644
--- a/libs/ardour/port.cc
+++ b/libs/ardour/port.cc
@@ -165,7 +165,12 @@ Port::get_connections (std::vector<std::string> & c) const
return c.size();
}
- return port_engine.get_connections (_port_handle, c);
+ if (_port_handle) {
+ return port_engine.get_connections (_port_handle, c);
+ return c.size();
+ }
+
+ return 0;
}
int