13
0

another tweak to maybe-fix crash in Playlist::fade_range()

This commit is contained in:
Paul Davis 2017-02-03 23:02:37 +01:00
parent 306647b1d0
commit a21a414615

View File

@ -3319,11 +3319,17 @@ void
Playlist::fade_range (list<AudioRange>& ranges)
{
RegionReadLock rlock (this);
for (list<AudioRange>::iterator r = ranges.begin(); r != ranges.end(); ++r) {
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) {
(*i)->fade_range ((*r).start, (*r).end);
}
}
for (list<AudioRange>::iterator r = ranges.begin(); r != ranges.end(); ) {
list<AudioRange>::iterator tmpr = r;
++tmpr;
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ) {
RegionList::const_iterator tmpi = i;
++tmpi;
(*i)->fade_range ((*r).start, (*r).end);
i = tmpi;
}
r = tmpr;
}
}
uint32_t