Fix crash: new_route_from_template can return an empty RouteList if contruction failed

This commit is contained in:
Nikolaus Gullotta 2019-07-24 15:12:49 -05:00 committed by Nikolaus Gullotta
parent da5081c059
commit 942b6e6afd
No known key found for this signature in database
GPG key ID: 565F60578092AA31

View file

@ -344,12 +344,14 @@ void MixerSnapshot::recall()
route = 0; //explicitly drop reference
RouteList rl = _session->new_route_from_template(1, order, node, name, disp);
boost::shared_ptr<Route> route = rl.front();
if(!route) {
//rl can be empty()
if(rl.empty()) {
continue;
}
boost::shared_ptr<Route> route = rl.front();
if(get_recall_groups()) {
XMLNode* group_node = find_named_node(node, X_("Group"));
if(group_node) {