diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-25 12:50:27 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:38 -0400 |
commit | b3d5d4f13853817696a1ea19ce2c7740c381c045 (patch) | |
tree | f0aebd330f029a17d1eb6892ec62e3ee70f21b8e /gtk2_ardour/gain_meter.cc | |
parent | cfc55e392ff4a6c551897a64a92f93a8982dc34d (diff) |
correctly set up members of GainMeterBase in ::set_controls()
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index a91382d574..bb20555eda 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -190,12 +190,15 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r, connections.clear (); model_connections.drop_connections (); - if (!pm && !amp) { + /* no meter and no control? nothing to do ... */ + + if (!pm && !control) { level_meter->set_meter (0); gain_slider->set_controllable (boost::shared_ptr<PBD::Controllable>()); _meter.reset (); _amp.reset (); _route.reset (); + _control.reset (); return; } @@ -204,8 +207,6 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r, _route = r; _control = control; - assert (_control); - level_meter->set_meter (pm.get()); gain_slider->set_controllable (_control); @@ -731,13 +732,13 @@ GainMeterBase::meter_point_clicked () void GainMeterBase::amp_start_touch () { - _control->start_touch (_amp->session().transport_frame()); + _control->start_touch (_control->session().transport_frame()); } void GainMeterBase::amp_stop_touch () { - _control->stop_touch (false, _amp->session().transport_frame()); + _control->stop_touch (false, _control->session().transport_frame()); } gint |