13
0

Fix crashes with empty route-lists e.g. mute_release w/o routes

This commit is contained in:
Robin Gareus 2017-04-16 23:48:49 +02:00
parent 029e963fb5
commit 976e03c15c

View File

@ -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) {
boost::shared_ptr<ControlList> cl (new ControlList);
if (!rl) { return cl; }
for (RouteList::const_iterator r = rl->begin(); r != rl->end(); ++r) {
boost::shared_ptr<AutomationControl> ac = ((*r).get()->*get_control)();
if (ac) {