mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
stop looping when deleting loop-range (fixes potential crash)
This commit is contained in:
parent
5a6ddb034e
commit
487ae58301
1 changed files with 7 additions and 0 deletions
|
|
@ -1035,6 +1035,7 @@ Locations::remove (Location *loc)
|
|||
|
||||
for (i = locations.begin(); i != locations.end(); ++i) {
|
||||
if ((*i) == loc) {
|
||||
bool was_loop = (*i)->is_auto_loop();
|
||||
delete *i;
|
||||
locations.erase (i);
|
||||
was_removed = true;
|
||||
|
|
@ -1042,6 +1043,12 @@ Locations::remove (Location *loc)
|
|||
current_location = 0;
|
||||
was_current = true;
|
||||
}
|
||||
if (was_loop) {
|
||||
if (_session.get_play_loop()) {
|
||||
_session.request_play_loop (false, false);
|
||||
}
|
||||
_session.auto_loop_location_changed (0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue