13
0

Fix bug #6506, crash when moving tempo markers with automation on midi tracks

This commit is contained in:
Tim Mayberry 2015-11-12 23:17:44 +10:00
parent 61e22d9f11
commit 9694dfc8d2

View File

@ -3304,6 +3304,7 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
swap_grab (&_marker->the_item(), 0, GDK_CURRENT_TIME);
if (!_copy) {
_editor->begin_reversible_command (_("move tempo mark"));
TempoMap& map (_editor->session()->tempo_map());
/* get current state */
before_state = &map.get_state();
@ -3348,7 +3349,6 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
_editor->commit_reversible_command ();
} else {
_editor->begin_reversible_command (_("move tempo mark"));
/* we removed it before, so add it back now */
map.add_tempo (_marker->tempo(), when);
XMLNode &after = map.get_state();