Fix crash on clear current playlists (#3524).

git-svn-id: svn://localhost/ardour2/branches/3.0@7976 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-11-06 00:30:56 +00:00
parent aa78fb928b
commit 95939610dd

View file

@ -4281,14 +4281,13 @@ Editor::center_edit_point ()
center_screen_internal (get_preferred_edit_position(), page); center_screen_internal (get_preferred_edit_position(), page);
} }
/** Caller must begin and commit a reversible command */
void void
Editor::clear_playlist (boost::shared_ptr<Playlist> playlist) Editor::clear_playlist (boost::shared_ptr<Playlist> playlist)
{ {
begin_reversible_command (_("clear playlist"));
playlist->clear_changes (); playlist->clear_changes ();
playlist->clear (); playlist->clear ();
_session->add_command (new StatefulDiffCommand (playlist)); _session->add_command (new StatefulDiffCommand (playlist));
commit_reversible_command ();
} }
void void