avoid crash during multi-region bounce

This commit is contained in:
Paul Davis 2022-12-12 16:21:27 -07:00
parent f8469a49ed
commit 0b07e1b26a

View File

@ -427,14 +427,15 @@ Editor::bounce_region_selection (bool with_processing)
InterThreadInfo itt;
boost::shared_ptr<Region> r;
std::string name;
if (multiple_selected) {
name = string_compose ("%1%2", bounce_name, r->name ());
name = string_compose ("%1%2", bounce_name, region->name ());
} else {
name = bounce_name;
}
boost::shared_ptr<Region> r;
if (with_processing) {
r = track->bounce_range (region->position_sample(), region->position_sample() + region->length_samples(), itt, track->main_outs(), false, name);
} else {