Catch potential exceptions when adding tracks/busses
This commit is contained in:
parent
57d7b5de65
commit
1d8dc009f7
@ -2374,6 +2374,7 @@ RouteUI::fan_out (bool to_busses, bool group)
|
||||
std::string bn = BUSNAME;
|
||||
boost::shared_ptr<Route> r = _session->route_by_name (bn);
|
||||
if (!r) {
|
||||
try {
|
||||
if (to_busses) {
|
||||
RouteList rl = _session->new_audio_route (busnames[bn], outputs, NULL, 1, bn, PresentationInfo::AudioBus, PresentationInfo::max_order);
|
||||
r = rl.front ();
|
||||
@ -2388,6 +2389,13 @@ RouteUI::fan_out (bool to_busses, bool group)
|
||||
cl->push_back (r->monitoring_control ());
|
||||
_session->set_controls (cl, (double) MonitorInput, Controllable::NoGroup);
|
||||
}
|
||||
} catch (...) {
|
||||
if (!to_group.empty()) {
|
||||
boost::shared_ptr<RouteList> rl (&to_group);
|
||||
_session->remove_routes (rl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
r->input ()->disconnect (this);
|
||||
}
|
||||
to_group.push_back (r);
|
||||
|
Loading…
Reference in New Issue
Block a user