diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 3545839dea..2b3a740543 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -1054,6 +1054,10 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible while (ti != _tempos.end() && ti->sclock() < bbt.reference().superclocks()) ++ti; while (mi != _meters.end() && mi->sclock() < bbt.reference().superclocks()) ++mi; + if (pi == _points.end()) { --pi; } + if (ti == _tempos.end()) { --ti; } + if (mi == _meters.end()) { --mi; } + return _get_tempo_and_meter > (t, m, &Point::bbt, bbt, pi, _points.end(), &*ti, &*mi, can_match, ret_iterator_after_not_at); } Points::const_iterator get_tempo_and_meter (TempoPoint const *& t, MeterPoint const *& m, superclock_t sc, bool can_match, bool ret_iterator_after_not_at) const {