Fix crash when inserting time with split intersected regions

This commit is contained in:
Robin Gareus 2017-03-02 21:20:09 +01:00
parent 5524bac04b
commit f0a3c84e8c
1 changed files with 5 additions and 4 deletions

View File

@ -7485,6 +7485,11 @@ Editor::insert_time (
(*i)->clear_changes ();
(*i)->clear_owned_changes ();
if (!in_command) {
begin_reversible_command (_("insert time"));
in_command = true;
}
if (opt == SplitIntersected) {
/* non musical split */
(*i)->split (MusicFrame (pos, 0));
@ -7492,10 +7497,6 @@ Editor::insert_time (
(*i)->shift (pos, frames, (opt == MoveIntersected), ignore_music_glue);
if (!in_command) {
begin_reversible_command (_("insert time"));
in_command = true;
}
vector<Command*> cmds;
(*i)->rdiff (cmds);
_session->add_commands (cmds);