Fix crash when removing custom transients

This fixes the following edge-case:
1. Place a custom transient marker.
2. Use Rhythm Ferret to analyze region.
3. Delete custom marker from (1) while rhythm-ferret
   dialog is still open, and analyzed onset markers are visible.
This commit is contained in:
Robin Gareus 2021-03-20 19:21:31 +01:00
parent d13eb84fa3
commit f361211891
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -1670,7 +1670,7 @@ AudioRegion::remove_transient (samplepos_t where)
if (!_onsets.empty ()) {
const samplepos_t p = where - _position;
AnalysisFeatureList::iterator i = std::find (_onsets.begin (), _onsets.end (), p);
if (i != _transients.end ()) {
if (i != _onsets.end ()) {
_onsets.erase (i);
changed = true;
}