summaryrefslogtreecommitdiff
path: root/libs/ardour/buffer_set.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-10-09 12:17:46 +0000
committerCarl Hetherington <carl@carlh.net>2010-10-09 12:17:46 +0000
commitd86000efd0ef92d57913c07236da465f32e679fb (patch)
treeacb4d6557b260d1517c51a5a936cb07955388276 /libs/ardour/buffer_set.cc
parent7d2cd8ed5c86a6a799c804df42476dbc16ed3932 (diff)
Fix crash when running an analysis of a plugin with MIDI IO.
git-svn-id: svn://localhost/ardour2/branches/3.0@7889 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/buffer_set.cc')
-rw-r--r--libs/ardour/buffer_set.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index e3022e745f..4c802b1443 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -215,6 +215,8 @@ BufferSet::get(DataType type, size_t i) const
LV2EventBuffer&
BufferSet::get_lv2_midi(bool input, size_t i)
{
+ assert (count().get(DataType::MIDI) > i);
+
MidiBuffer& mbuf = get_midi(i);
LV2Buffers::value_type b = _lv2_buffers.at(i * 2 + (input ? 0 : 1));
LV2EventBuffer* ebuf = b.second;