mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 05:06:31 +01:00
Fix crashes with empty route-lists e.g. mute_release w/o routes
This commit is contained in:
parent
029e963fb5
commit
976e03c15c
1 changed files with 1 additions and 0 deletions
|
|
@ -178,6 +178,7 @@ LIBARDOUR_API uint32_t how_many_dsp_threads ();
|
||||||
|
|
||||||
template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list (boost::shared_ptr<RouteList> rl, boost::shared_ptr<T> (Stripable::*get_control)() const) {
|
template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list (boost::shared_ptr<RouteList> rl, boost::shared_ptr<T> (Stripable::*get_control)() const) {
|
||||||
boost::shared_ptr<ControlList> cl (new ControlList);
|
boost::shared_ptr<ControlList> cl (new ControlList);
|
||||||
|
if (!rl) { return cl; }
|
||||||
for (RouteList::const_iterator r = rl->begin(); r != rl->end(); ++r) {
|
for (RouteList::const_iterator r = rl->begin(); r != rl->end(); ++r) {
|
||||||
boost::shared_ptr<AutomationControl> ac = ((*r).get()->*get_control)();
|
boost::shared_ptr<AutomationControl> ac = ((*r).get()->*get_control)();
|
||||||
if (ac) {
|
if (ac) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue