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);