13
0

never try to remove state from a read-only session

git-svn-id: svn://localhost/ardour2/branches/3.0@12735 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-06-16 02:50:20 +00:00
parent a8dd4ec805
commit 0ea8ba3f56

View File

@ -675,7 +675,7 @@ Session::rename_state (string old_name, string new_name)
void
Session::remove_state (string snapshot_name)
{
if (snapshot_name == _current_snapshot_name || snapshot_name == _name) {
if (!_writable || snapshot_name == _current_snapshot_name || snapshot_name == _name) {
// refuse to remove the current snapshot or the "main" one
return;
}