diff options
author | Carl Hetherington <carl@carlh.net> | 2010-02-03 00:52:45 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-02-03 00:52:45 +0000 |
commit | c3bfc3ec4e14d147d9c4c279eb6c73947781f956 (patch) | |
tree | 250b7e09a3552419249c317eec5258d08fe801ba /gtk2_ardour/generic_pluginui.cc | |
parent | faa2b3a3ad9217b0bde341f50a398515aefd703a (diff) |
Stop crash on deleting a plugin when its generic UI window is open.
git-svn-id: svn://localhost/ardour2/branches/3.0@6626 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/generic_pluginui.cc')
-rw-r--r-- | gtk2_ardour/generic_pluginui.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 3d59910ff4..974d16887c 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -381,9 +381,10 @@ GenericPluginUI::print_parameter (char *buf, uint32_t len, uint32_t param) GenericPluginUI::ControlUI* GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<AutomationControl> mcontrol) { - ControlUI* control_ui = NULL; - if (!mcontrol) + ControlUI* control_ui = 0; + if (!mcontrol) { return control_ui; + } Plugin::ParameterDescriptor desc; @@ -545,6 +546,8 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat mcontrol->Changed.connect (control_connections, boost::bind (&GenericPluginUI::parameter_changed, this, control_ui), gui_context()); mcontrol->alist()->automation_state_changed.connect (control_connections, boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui), gui_context()); + input_controls.push_back (control_ui); + } else if (plugin->parameter_is_output (port_index)) { control_ui->display = manage (new EventBox); @@ -749,9 +752,14 @@ GenericPluginUI::start_updating (GdkEventAny*) bool GenericPluginUI::stop_updating (GdkEventAny*) { + for (vector<ControlUI*>::iterator i = input_controls.begin(); i != input_controls.end(); ++i) { + (*i)->controller->stop_updating (); + } + if (output_controls.size() > 0 ) { screen_update_connection.disconnect(); } + return false; } |