13
0

fix potential crash in LV2Plugin::connect_and_run() when music starts after 0

This commit is contained in:
nick_m 2017-03-10 03:59:25 +11:00
parent e04d237674
commit 87d474b391

View File

@ -1609,6 +1609,10 @@ TempoMap::metric_at (framepos_t frame, Metrics::const_iterator* last) const
Glib::Threads::RWLock::ReaderLock lm (lock);
TempoMetric m (first_meter(), first_tempo());
if (last) {
*last = ++_metrics.begin();
}
/* at this point, we are *guaranteed* to have m.meter and m.tempo pointing
at something, because we insert the default tempo and meter during
TempoMap construction.