From 0ea8ba3f560bd90dfc8e5401d370176d7aa66734 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 16 Jun 2012 02:50:20 +0000 Subject: [PATCH] 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 --- libs/ardour/session_state.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 30f8571c01..347c4ee35b 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -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; }