Fix issue with tracks/buses having more outputs than there are control outputs.
authorSampo Savolainen <v2@iki.fi>
Fri, 5 Oct 2007 21:37:57 +0000 (21:37 +0000)
committerSampo Savolainen <v2@iki.fi>
Fri, 5 Oct 2007 21:37:57 +0000 (21:37 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2520 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/route.cc

index 792b316ed5cb9c1ec1c91ed837af8329c1ca680b..26b38658b4ed930a952accb451591250a19ece88 100644 (file)
@@ -1991,7 +1991,7 @@ Route::set_control_outs (const vector<string>& ports)
        /* now connect to the named ports */
 
        for (uint32_t n = 0; n < limit; ++n) {
-               if (_control_outs->connect_output (_control_outs->output (n), ports[n], this)) {
+               if (_control_outs->connect_output (_control_outs->output (n), ports[n % ports.size()], this)) {
                        error << string_compose (_("could not connect %1 to %2"), _control_outs->output(n)->name(), ports[n]) << endmsg;
                        return -1;
                }