diff options
author | nick_m <mainsbridge@gmail.com> | 2017-02-27 11:41:48 +1100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-27 20:16:10 +0100 |
commit | f3ada6f89347d1230cb2ce3a10582ab769c321af (patch) | |
tree | 95eb804ebb0fe015fff818a9569db90fb4fbaf8d /libs/ardour/tempo.cc | |
parent | 3a7bc1fd3f32f0681182bcb399c030eb1899e523 (diff) |
harden TempoMap::next_tempo_section () a bit.
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 3738992479..3865fe3e19 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -4288,6 +4288,10 @@ TempoMap::tempo_section_at_beat_locked (const Metrics& metrics, const double& be TempoSection* TempoMap::next_tempo_section (TempoSection* ts) const { + if (!ts) { + return 0; + } + Glib::Threads::RWLock::ReaderLock lm (lock); TempoSection* prev = 0; |