From 4848cb6d428b348e0fbb9dfee44e4e10024d2672 Mon Sep 17 00:00:00 2001 From: nick_m Date: Tue, 16 Aug 2016 00:43:08 +1000 Subject: [PATCH] Enforce rounding to beat as >= 0.0 --- libs/ardour/tempo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index bdea2ae6a1..754b60f249 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -3143,7 +3143,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type) { Glib::Threads::RWLock::ReaderLock lm (lock); - const double beat_at_framepos = beat_at_frame_locked (_metrics, frame); + const double beat_at_framepos = max (0.0, beat_at_frame_locked (_metrics, frame)); BBT_Time bbt (bbt_at_beat_locked (_metrics, beat_at_framepos)); switch (type) {