diff options
author | nick_m <mainsbridge@gmail.com> | 2016-07-04 01:12:55 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-07-10 02:18:37 +1000 |
commit | 0bdbe56cf16cb2abaee65adc682830806e9d8940 (patch) | |
tree | 4ea110222eb772dec36cb4bd2e920108ad04ebcd /gtk2_ardour/editor_drag.cc | |
parent | 828cb52f86410da447cb93e5033ccaf4ea43b4cc (diff) |
Stop passing references to things that may disappear when a metric section is replaced.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index cb4de0cf7c..c8afd81476 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3324,14 +3324,16 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move) _editor->begin_reversible_command (_("move tempo mark")); } else { + const Tempo tempo (_marker->tempo()); const framepos_t frame = adjusted_current_frame (event) + 1; + const TempoSection::Type type = _real_section->type(); _editor->begin_reversible_command (_("copy tempo mark")); if (_real_section->position_lock_style() == MusicTime) { - _real_section = map.add_tempo (_marker->tempo(), map.pulse_at_frame (frame), 0, _real_section->type(), MusicTime); + _real_section = map.add_tempo (tempo, map.pulse_at_frame (frame), 0, type, MusicTime); } else { - _real_section = map.add_tempo (_marker->tempo(), 0.0, frame, _real_section->type(), AudioTime); + _real_section = map.add_tempo (tempo, 0.0, frame, type, AudioTime); } if (!_real_section) { |