From 8de12a40158683c665fc0bf242b2fc150d3ad538 Mon Sep 17 00:00:00 2001 From: nick_m Date: Thu, 9 Jun 2016 05:16:38 +1000 Subject: [PATCH] Possible fix for memory pool problem in session click. --- libs/ardour/tempo.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index d46656c4c7..c39a78ff7f 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -2940,6 +2940,11 @@ TempoMap::get_grid (vector& points, if (cnt < 0.0) { cnt = 0.0; } + + if (frame_at_beat_locked (_metrics, cnt) >= upper) { + return; + } + while (pos < upper) { pos = frame_at_beat_locked (_metrics, cnt); const TempoSection tempo = tempo_section_at_frame_locked (_metrics, pos);