From 31c3a3c4e8a9a35870fe7ae086de75726e925f51 Mon Sep 17 00:00:00 2001 From: Krzysztof Foltman Date: Sun, 5 Jan 2014 11:34:20 +0000 Subject: [PATCH] Wavetable, Organ: fix crash when running out of voices --- src/synth.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/synth.cpp b/src/synth.cpp index 288a388..86423cd 100644 --- a/src/synth.cpp +++ b/src/synth.cpp @@ -107,6 +107,8 @@ void basic_synth::note_on(int note, int vel) } bool perc = check_percussion(); dsp::voice *v = give_voice(); + if (!v) + return; v->setup(sample_rate); v->released = false; v->sostenuto = false; -- 2.11.4.GIT