try to catch https://github.com/rncbc/synthv1/issues/1#issuecomment-183041991
[ardour.git] / libs / ardour / lv2_plugin.cc
index 507e546adc7239362c84712e4ae80afbf0c8b5c4..81266b8ed4aed5c64b8c676dee5b1a00803aad17 100644 (file)
@@ -2155,6 +2155,7 @@ 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());
                                                ++m;