diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-16 04:09:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-16 04:09:03 +0000 |
commit | bca0450c188cdac82fbc74d05b5d72aff9115646 (patch) | |
tree | 688870950203e270b1dbc9baf975daa4c6d0d56c /libs/ardour/session_events.cc | |
parent | 0b7a7cba788c20d9554ab8aa5b38bacf16e72ab6 (diff) |
possible fix for crash while adding new tracks
git-svn-id: svn://localhost/ardour2/trunk@1603 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_events.cc')
-rw-r--r-- | libs/ardour/session_events.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index e93a7a5f17..416d72969e 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -410,6 +410,18 @@ Session::process_event (Event* ev) case Event::InputConfigurationChange: post_transport_work = PostTransportWork (post_transport_work | PostTransportInputChange); + { + RCUWriter<DiskstreamList> writer (diskstreams); + boost::shared_ptr<DiskstreamList> ds = writer.get_copy(); + ds->remove (ev->diskstream); + /* writer goes out of scope, copies ds back to main */ + } + { + RCUWriter<DiskstreamList> writer (diskstreams_input_pending); + boost::shared_ptr<DiskstreamList> ds = writer.get_copy(); + ds->push_back (ev->diskstream); + /* writer goes out of scope, copies ds back to main */ + } schedule_butler_transport_work (); break; |