From 114b5088c76f2a0d9aecc3beafd993b0cb916ae2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 20 Aug 2019 04:29:06 +0200 Subject: [PATCH] There is always at least a tempo and meter section --- libs/ardour/tempo.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index e5671a01c4..ce629df3e0 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -4258,6 +4258,12 @@ TempoMap::tempo_section_at_beat_locked (const Metrics& metrics, const double& be } } + + if (prev_t == 0) { + fatal << endmsg; + abort(); /*NOTREACHED*/ + } + return *prev_t; } @@ -4435,6 +4441,12 @@ TempoMap::meter_section_at_beat_locked (const Metrics& metrics, const double& be } } + + if (prev_m == 0) { + fatal << endmsg; + abort(); /*NOTREACHED*/ + } + return *prev_m; }