summaryrefslogtreecommitdiff
path: root/libs/ardour/location.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-01-28 12:04:00 +0100
committerRobin Gareus <robin@gareus.org>2017-01-28 12:05:50 +0100
commit487ae583017a1e60ae5c7e47c3e9863eb433e31e (patch)
treee7c4279afde573d273849823780c55e81f0e0bab /libs/ardour/location.cc
parent5a6ddb034e998a84657210e0784101783a8a7d8b (diff)
stop looping when deleting loop-range (fixes potential crash)
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r--libs/ardour/location.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index 1b53c705d8..77177391b0 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -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;
}
}