Fix crash when removing time from track with automation

Resolves : #7287
This commit is contained in:
Tim Mayberry 2017-03-10 22:59:58 +10:00
parent f21111d7df
commit 1519565890

View File

@ -7656,16 +7656,17 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
XMLNode &before = pl->get_state();
if (!in_command) {
begin_reversible_command (_("remove time"));
in_command = true;
}
std::list<AudioRange> rl;
AudioRange ar(pos, pos+frames, 0);
rl.push_back(ar);
pl->cut (rl);
pl->shift (pos, -frames, true, ignore_music_glue);
if (!in_command) {
begin_reversible_command (_("remove time"));
in_command = true;
}
XMLNode &after = pl->get_state();
_session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));