diff options
author | Carl Hetherington <carl@carlh.net> | 2009-01-21 23:29:15 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-01-21 23:29:15 +0000 |
commit | d58b8c243fc4e23fa442c03eaaabdeadd8e713d4 (patch) | |
tree | f1c0aa54f8ab6a0c4845f4d4d8fc31a93d0f4d4d /gtk2_ardour/processor_box.cc | |
parent | 7593f104abbd6407e2e7bc899f29190e3755aae3 (diff) |
Fix sends.
git-svn-id: svn://localhost/ardour2/branches/3.0@4426 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 75e54e4b66..0c97c59ae4 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -516,6 +516,10 @@ ProcessorBox::choose_send () ios->show_all (); + /* bit of a hack; keep a shared_ptr to send around so that it doesn't get deleted while + the IOSelectorWindow is doing its stuff */ + _send_being_created = send; + boost::shared_ptr<Processor> r = boost::static_pointer_cast<Processor>(send); ios->selector().Finished.connect (bind (mem_fun(*this, &ProcessorBox::send_io_finished), boost::weak_ptr<Processor>(r), ios)); @@ -526,6 +530,9 @@ ProcessorBox::send_io_finished (IOSelector::Result r, boost::weak_ptr<Processor> { boost::shared_ptr<Processor> processor (weak_processor.lock()); + /* now we can lose the dummy shared_ptr */ + _send_being_created.reset (); + if (!processor) { return; } |