zynaddsubfx

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

commit 78819d0209f0fd0ed922c710e4b8c09cc7bc622a
parent 5f3dfa4fe1a92076faa31f1210af08aa3b3ac6ae
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sat, 16 Jun 2012 21:02:20 -0400

Fixes possible segfault when changing instruments

- Part is now told to shut up before changing instrument, this should avoid race
  conditions with the newer part loading

Diffstat:
Msrc/Misc/Bank.cpp | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/Misc/Bank.cpp b/src/Misc/Bank.cpp @@ -175,6 +175,7 @@ void Bank::loadfromslot(unsigned int ninstrument, Part *part) if(emptyslot(ninstrument)) return; + part->AllNotesOff(); part->defaultsinstrument(); part->loadXMLinstrument(ins[ninstrument].filename.c_str());