diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index f1a3a67a89..e1d43f4cd6 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -68,10 +68,15 @@ RouteGroup::set_name (string str) FlagsChanged (0); /* EMIT SIGNAL */ } +/** Add a route to a group. Adding a route which is already in the group is allowed; nothing will happen. + * @param r Route to add. + */ int RouteGroup::add (boost::shared_ptr r) { - assert (find (routes->begin(), routes->end(), r) == routes->end ()); + if (find (routes->begin(), routes->end(), r) != routes->end()) { + return 0; + } r->leave_route_group ();