disconnect AuxSend connection when deleting bus
authorRobin Gareus <robin@gareus.org>
Tue, 30 Jul 2013 13:12:32 +0000 (15:12 +0200)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 8 Aug 2013 19:26:17 +0000 (15:26 -0400)
fixes crash:
 - add bus
 - aux-send a signal to that bus
 - delete bus
 - add another bus
 - aux-send a signal to "another bus"
 - click "Aux Send" button on "another bus"
 - crash

gtk2_ardour/route_ui.cc
gtk2_ardour/route_ui.h

index bbc60ef4259196fa5878cfbb14d827a1c0476a59..6a114b0e5fb4985eb0f14246aea0c7ebb69592e3 100644 (file)
@@ -61,7 +61,7 @@ using namespace ARDOUR;
 using namespace PBD;
 
 uint32_t RouteUI::_max_invert_buttons = 3;
-sigc::signal<void, boost::shared_ptr<Route> > RouteUI::BusSendDisplayChanged;
+PBD::Signal1<void, boost::shared_ptr<Route> > RouteUI::BusSendDisplayChanged;
 boost::weak_ptr<Route> RouteUI::_showing_sends_to;
 
 RouteUI::RouteUI (ARDOUR::Session* sess)
@@ -171,7 +171,7 @@ RouteUI::init ()
        monitor_disk_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_press));
        monitor_disk_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_release));
 
-       BusSendDisplayChanged.connect (sigc::mem_fun (*this, &RouteUI::bus_send_display_changed));
+       BusSendDisplayChanged.connect (*this, invalidator (*this), boost::bind(&RouteUI::bus_send_display_changed, this, _1), gui_context());
 }
 
 void
index 0501c78937406c80721aadc299c37de2cedb716c..245101f61627b2cb8a72bcbb2fc8b7b3767313b1 100644 (file)
@@ -225,7 +225,7 @@ class RouteUI : public virtual AxisView
         *  by a click on the `Sends' button.  The parameter is the route that the sends are
         *  to, or 0 if no route is now in this mode.
         */
-       static sigc::signal<void, boost::shared_ptr<ARDOUR::Route> > BusSendDisplayChanged;
+       static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Route> > BusSendDisplayChanged;
 
    protected:
        PBD::ScopedConnectionList route_connections;