diff options
author | nick_m <mainsbridge@gmail.com> | 2017-03-10 03:59:25 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-03-10 03:59:25 +1100 |
commit | 87d474b39114ae856dd8880142c206971b81878a (patch) | |
tree | e87caa5241f0dc0481e66d2c51c69ef5b0d82bcd /libs/ardour/tempo.cc | |
parent | e04d2376740a79a792275afa971e0ad38b72dddb (diff) |
fix potential crash in LV2Plugin::connect_and_run() when music starts after 0
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index bb61fb7012..cc40ef5532 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -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. |