diff options
-rw-r--r-- | libs/ardour/location.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index bc97519ffe..de70abb6c5 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1041,6 +1041,11 @@ Locations::remove (Location *loc) for (i = locations.begin(); i != locations.end(); ++i) { if ((*i) == loc) { bool was_loop = (*i)->is_auto_loop(); + if ((*i)->is_auto_punch()) { + /* needs to happen before deleting: + * disconnect signals, clear events */ + _session.set_auto_punch_location (0); + } delete *i; locations.erase (i); was_removed = true; |