Safeguard `stripable_list_to_control_list` API
See also976e03c15c
which does this for `route_list_to_control_list`. Fix crashes with empty route-lists e.g. momentary solo which was introduced in03105aa760
.
This commit is contained in:
parent
94b7ed8d4c
commit
810da43be6
|
@ -137,6 +137,7 @@ template<typename T> std::shared_ptr<AutomationControlList> stripable_list_to_co
|
|||
|
||||
template<typename T> std::shared_ptr<AutomationControlList> stripable_list_to_control_list (std::shared_ptr<StripableList const> sl, std::shared_ptr<T> (Stripable::*get_control)() const) {
|
||||
std::shared_ptr<AutomationControlList> cl (new AutomationControlList);
|
||||
if (!sl) { return cl; }
|
||||
for (auto const & s : *sl) {
|
||||
std::shared_ptr<AutomationControl> ac = (s.get()->*get_control)();
|
||||
if (ac) {
|
||||
|
|
Loading…
Reference in New Issue