Fix naming-related issue with adding multiple buses at the same time

git-svn-id: svn://localhost/ardour2/branches/2.0.1@1785 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sampo Savolainen 2007-05-05 15:26:23 +00:00
parent 2c37c19290
commit 6959b1728e

View file

@ -1872,11 +1872,13 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_
do {
snprintf (bus_name, sizeof(bus_name), "Bus %" PRIu32, bus_id);
bus_id++;
if (route_by_name (bus_name) == 0) {
break;
}
} while (++bus_id < (UINT_MAX-1));
} while (bus_id < (UINT_MAX-1));
try {
shared_ptr<Route> bus (new Route (*this, bus_name, -1, -1, -1, -1, Route::Flag(0), DataType::AUDIO));