Fix crash when showing UI for plugins with output control ports.

This commit is contained in:
David Robillard 2014-11-02 13:02:54 -05:00
parent 23d95e1bca
commit 21dde8f2a7
2 changed files with 28 additions and 17 deletions

View file

@ -226,9 +226,10 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
/* FIXME: Unify with AutomationController */
struct ControlUI : public Gtk::HBox {
boost::shared_ptr<ARDOUR::AutomationControl> control;
const Evoral::Parameter parameter() const { return param; }
Evoral::Parameter parameter() { return control->parameter(); }
Evoral::Parameter param;
boost::shared_ptr<ARDOUR::AutomationControl> control;
/* input */
@ -252,7 +253,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
Gtk::VBox* vbox;
MeterInfo* meterinfo;
ControlUI ();
ControlUI (const Evoral::Parameter& param);
~ControlUI ();
};
@ -262,8 +263,10 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
void output_update();
void build ();
ControlUI* build_control_ui (const ARDOUR::ParameterDescriptor& desc,
ControlUI* build_control_ui (const Evoral::Parameter& param,
const ARDOUR::ParameterDescriptor& desc,
boost::shared_ptr<ARDOUR::AutomationControl> mcontrol,
float value,
bool is_input);
void ui_parameter_changed (ControlUI* cui);