diff options
author | Robin Gareus <robin@gareus.org> | 2016-02-16 18:17:13 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-02-16 18:17:13 +0100 |
commit | 31442cd63d6ff311b4fcf65e82d2797c0031ab53 (patch) | |
tree | 09ba1e1b1aaa59802e67974c9991fd6e86bcab15 | |
parent | cbdae785118863cf04a4d9cf63524801f55b8df5 (diff) |
work-around case where metric is NULL in split cycles.
This really needs to be fixed on a higher level.
e.g Pluin::connect_and_run() needs to be passed the current time identical to
PluginInsert::connect_and_run()
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 81266b8ed4..7791c0b7dd 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -2155,9 +2155,10 @@ LV2Plugin::connect_and_run(BufferSet& bufs, ? *metric_i : NULL; if (m != m_end && (!metric || metric->frame() > (*m).time())) { const Evoral::MIDIEvent<framepos_t> ev(*m, false); - assert (ev.time() < nframes); - LV2_Evbuf_Iterator eend = lv2_evbuf_end(_ev_buffers[port_index]); - lv2_evbuf_write(&eend, ev.time(), 0, type, ev.size(), ev.buffer()); + if (ev.time() < nframes) { + LV2_Evbuf_Iterator eend = lv2_evbuf_end(_ev_buffers[port_index]); + lv2_evbuf_write(&eend, ev.time(), 0, type, ev.size(), ev.buffer()); + } ++m; } else { tmetric.set_metric(metric); |