summaryrefslogtreecommitdiff
path: root/libs/ardour/route_group.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/route_group.cc')
-rw-r--r--libs/ardour/route_group.cc7
1 files changed, 6 insertions, 1 deletions
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<Route> 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 ();