summaryrefslogtreecommitdiff
path: root/libs/ardour/port_set.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-05-06 23:34:04 +0200
committerRobin Gareus <robin@gareus.org>2014-05-06 23:34:34 +0200
commit6142c814bf991b829ccb8818050d0cac8ffb9d9e (patch)
tree7e48e29909a33078305088f6fd6a603405131799 /libs/ardour/port_set.cc
parentfbbf911229b676208e06a3a8fc141dcc07172c37 (diff)
provide plugins with all available buffers.
e.g. Audio in -> Midi out plugins (on an audio-track). Midi-buffers do exist in the route but no corresponding (physical) Input port-buffer exists and ardour crashed. Now, the plugin itself still only accesses the mapped ports (ChanMapping), but the mapped buffers are at most "processor_max_streams" and at least the required in+out buffers for the plugin.
Diffstat (limited to 'libs/ardour/port_set.cc')
-rw-r--r--libs/ardour/port_set.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/port_set.cc b/libs/ardour/port_set.cc
index c7f5e2e674..3489ae4e44 100644
--- a/libs/ardour/port_set.cc
+++ b/libs/ardour/port_set.cc
@@ -145,9 +145,11 @@ PortSet::port(DataType type, size_t n) const
return port(n);
} else {
const PortVec& v = _ports[type];
- assert(n < v.size());
- return v[n];
+ if (n < v.size()) {
+ return v[n];
+ }
}
+ return boost::shared_ptr<Port>();
}
boost::shared_ptr<AudioPort>