From dd7c0cca6c749a2177212e9a7b3dd4eca5e5dd74 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sun, 4 Sep 2016 04:19:34 +1000 Subject: [PATCH] Sanity check for TempoMap::get_grid () --- 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 4257767458..41a8f91ec5 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -3474,7 +3474,7 @@ TempoMap::get_grid (vector& points, return; } - while (pos < upper) { + while (pos >= 0 && pos < upper) { pos = frame_at_beat_locked (_metrics, cnt); const TempoSection tempo = tempo_section_at_frame_locked (_metrics, pos); const MeterSection meter = meter_section_at_frame_locked (_metrics, pos);