From db1861e76aa1a42789c78f37f110cc81c0339a2d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 Jul 2007 02:05:09 +0000 Subject: Fix crash triggered by closing controls window (twice, sometimes). git-svn-id: http://svn.drobilla.net/lad/ingen@608 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/ControlGroups.cpp | 10 +++++++++- src/libs/gui/ControlGroups.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libs/gui/ControlGroups.cpp b/src/libs/gui/ControlGroups.cpp index 14d67870..5098c3f8 100644 --- a/src/libs/gui/ControlGroups.cpp +++ b/src/libs/gui/ControlGroups.cpp @@ -43,6 +43,14 @@ ControlGroup::ControlGroup(BaseObjectType* cobject, const Glib::RefPtr pm) assert(_port_model); assert(panel); - pm->control_change_sig.connect(sigc::mem_fun(this, &ControlGroup::set_value)); + _control_connection = pm->control_change_sig.connect(sigc::mem_fun(this, &ControlGroup::set_value)); } diff --git a/src/libs/gui/ControlGroups.h b/src/libs/gui/ControlGroups.h index 4a1f758e..4c5c6f11 100644 --- a/src/libs/gui/ControlGroups.h +++ b/src/libs/gui/ControlGroups.h @@ -43,7 +43,7 @@ class ControlGroup : public Gtk::VBox { public: ControlGroup(BaseObjectType* cobject, const Glib::RefPtr& glade_xml); - virtual ~ControlGroup() { } + virtual ~ControlGroup(); void init(ControlPanel* panel, SharedPtr pm); @@ -57,6 +57,7 @@ protected: ControlPanel* _control_panel; SharedPtr _port_model; + sigc::connection _control_connection; bool _enable_signal; }; -- cgit v1.2.1