summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/utils.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-16 23:48:49 +0200
committerRobin Gareus <robin@gareus.org>2017-04-16 23:48:49 +0200
commit976e03c15ccc0f2939507a06eea02a8bfb439e57 (patch)
tree91a3357029825a0f29742bf871400934a5e8cab4 /libs/ardour/ardour/utils.h
parent029e963fb52aed721579e82ebf95fe994a6ba8b0 (diff)
Fix crashes with empty route-lists e.g. mute_release w/o routes
Diffstat (limited to 'libs/ardour/ardour/utils.h')
-rw-r--r--libs/ardour/ardour/utils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index cc6e5044ce..b06f7f17a8 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -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) {