zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 8293230a2a0af8b9370d557a13b324f04c072119
parent 78819d0209f0fd0ed922c710e4b8c09cc7bc622a
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Tue, 19 Jun 2012 21:03:49 -0400

Fixes uninitialized value within ADnote

- This fixes a possible segfault when changing a part between mono and stero
  mode, or for that matter, it is possible to trigger a bug when dealing with
  the distruction of a mono Adnote, which has not had this value previously set

Diffstat:
Msrc/Synth/ADnote.cpp | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/Synth/ADnote.cpp b/src/Synth/ADnote.cpp @@ -1792,6 +1792,8 @@ void ADnote::Global::initparameters(const ADnoteGlobalParam &param, GlobalFilterL = Filter::generate(param.GlobalFilter); if(stereo) GlobalFilterR = Filter::generate(param.GlobalFilter); + else + GlobalFilterR = NULL; FilterEnvelope = new Envelope(param.FilterEnvelope, basefreq); FilterLfo = new LFO(param.FilterLfo, basefreq);