summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-06-28 21:36:13 +0200
committerRobin Gareus <robin@gareus.org>2014-06-28 22:02:20 +0200
commit4a7eb62bf869e156d58e5c6f56ac355e747b3ad9 (patch)
tree12cb666f7d363be3f0fa89c34c4352874e70fac1 /gtk2_ardour
parentecd11253c1b4a06e9fd77a9ccc126850abf7a72f (diff)
use state Session::StateProtector
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_ops.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 96be9ed4a5..aa386e6340 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -6565,8 +6565,11 @@ edit your ardour.rc file to set the\n\
return;
}
- for (vector<boost::shared_ptr<Route> >::iterator x = routes.begin(); x != routes.end(); ++x) {
- _session->remove_route (*x);
+ {
+ Session::StateProtector sp (_session);
+ for (vector<boost::shared_ptr<Route> >::iterator x = routes.begin(); x != routes.end(); ++x) {
+ _session->remove_route (*x);
+ }
}
}