1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 09:01:15 +02:00

Bug2086: Mixer board behavior...

... and also fixed analogous mistakes in some effects (Vamp, SoundTouch, and
SBSMS effects), found by review of all uses of TrackList::Channels.

The first member of the pair of iterators returned by TrackList::Channels
does not necessarily deference to a null pointer when it is incremented to
the end of the range.
This commit is contained in:
Paul Licameli
2019-03-29 11:05:01 -04:00
parent fc14d031e4
commit 2de696b461
4 changed files with 17 additions and 8 deletions

View File

@@ -372,7 +372,9 @@ bool VampEffect::Process()
unsigned channels = 1;
const WaveTrack *right = *channelGroup.first++;
// channelGroup now contains all but the first channel
const WaveTrack *right =
channelGroup.size() ? *channelGroup.first++ : nullptr;
if (right)
{
channels = 2;