summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2017-02-27 17:40:20 +1100
committerRobin Gareus <robin@gareus.org>2017-02-27 20:16:10 +0100
commitf4575442634bcecf3caa633b849502491ed19ae7 (patch)
tree7bbba97a8da465a925d3ac75244e3851cc2947ca /libs/ardour/tempo.cc
parentabd89ffa7df289f70862537647afe3369987e620 (diff)
fix crash in pinch drag
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 3865fe3e19..345d09b8bf 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -3661,7 +3661,7 @@ TempoMap::gui_twist_tempi (TempoSection* ts, const Tempo& bpm, const framepos_t
double new_next_bpm;
double new_copy_end_bpm;
- if (frame > prev_to_prev_t->frame() + min_dframe && (frame + tempo_copy_frame_contribution) > prev_to_prev_t->frame() + min_dframe) {
+ if (frame > tempo_copy->frame() + min_dframe && (frame + tempo_copy_frame_contribution) > tempo_copy->frame() + min_dframe) {
new_bpm = tempo_copy->note_types_per_minute() * ((frame - tempo_copy->frame())
/ (double) (end_frame - tempo_copy->frame()));
} else {
@@ -3698,7 +3698,7 @@ TempoMap::gui_twist_tempi (TempoSection* ts, const Tempo& bpm, const framepos_t
}
if (next_t->type() == TempoSection::Constant || next_t->c() == 0.0) {
- if (frame > prev_to_prev_t->frame() + min_dframe && end_frame > prev_to_prev_t->frame() + min_dframe) {
+ if (frame > tempo_copy->frame() + min_dframe && end_frame > tempo_copy->frame() + min_dframe) {
new_next_bpm = next_t->note_types_per_minute() * ((next_to_next_t->minute() - old_next_minute)
/ (double) ((old_next_to_next_minute) - old_next_minute));