Fix crash when twiddling MIDI controllers (#6050).
This commit is contained in:
parent
59af923b77
commit
124e54f01b
@ -40,7 +40,10 @@ class Automatable;
|
|||||||
|
|
||||||
/** A PBD::Controllable with associated automation data (AutomationList)
|
/** A PBD::Controllable with associated automation data (AutomationList)
|
||||||
*/
|
*/
|
||||||
class LIBARDOUR_API AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this<AutomationControl>
|
class LIBARDOUR_API AutomationControl
|
||||||
|
: public PBD::Controllable
|
||||||
|
, public Evoral::Control
|
||||||
|
, public boost::enable_shared_from_this<AutomationControl>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AutomationControl(ARDOUR::Session&,
|
AutomationControl(ARDOUR::Session&,
|
||||||
@ -58,19 +61,19 @@ public:
|
|||||||
void set_list (boost::shared_ptr<Evoral::ControlList>);
|
void set_list (boost::shared_ptr<Evoral::ControlList>);
|
||||||
|
|
||||||
inline bool automation_playback() const {
|
inline bool automation_playback() const {
|
||||||
return alist()->automation_playback();
|
return alist() ? alist()->automation_playback() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool automation_write() const {
|
inline bool automation_write() const {
|
||||||
return alist()->automation_write();
|
return alist() ? alist()->automation_write() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline AutoState automation_state() const {
|
inline AutoState automation_state() const {
|
||||||
return alist()->automation_state();
|
return alist() ? alist()->automation_state() : Off;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline AutoStyle automation_style() const {
|
inline AutoStyle automation_style() const {
|
||||||
return alist()->automation_style();
|
return alist() ? alist()->automation_style() : Absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_automation_state(AutoState as);
|
void set_automation_state(AutoState as);
|
||||||
|
@ -106,6 +106,7 @@ AutomationControl::set_automation_state (AutoState as)
|
|||||||
void
|
void
|
||||||
AutomationControl::set_automation_style (AutoStyle as)
|
AutomationControl::set_automation_style (AutoStyle as)
|
||||||
{
|
{
|
||||||
|
if (!_list) return;
|
||||||
alist()->set_automation_style (as);
|
alist()->set_automation_style (as);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user