mackie control: Fix crash when selecting Track on MIDI strip, don't create phase control if there is none.

This commit is contained in:
Len Ovens 2016-02-03 10:35:35 -08:00
parent 9cce8d10a9
commit 7d5671a411
2 changed files with 12 additions and 4 deletions

View File

@ -497,10 +497,6 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
return _mute_master;
}
boost::shared_ptr<PhaseControllable> phase_control() const {
return _phase_control;
}
boost::shared_ptr<SoloIsolateControllable> solo_isolate_control() const {
return _solo_isolate_control;
}
@ -527,6 +523,8 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
boost::shared_ptr<Pannable> pannable() const;
boost::shared_ptr<GainControl> trim_control() const;
boost::shared_ptr<PhaseControllable> phase_control() const;
/**
Return the first processor that accepts has at least one MIDI input
and at least one audio output. In the vast majority of cases, this

View File

@ -4209,6 +4209,16 @@ Route::trim_control() const
return _trim_control;
}
boost::shared_ptr<Route::PhaseControllable>
Route::phase_control() const
{
if (phase_invert().size()) {
return _phase_control;
} else {
return boost::shared_ptr<PhaseControllable>();
}
}
boost::shared_ptr<AutomationControl>
Route::get_control (const Evoral::Parameter& param)
{